Junk was written by Paul McCartney while the group was in India on retreat with the Maharishi Mahesh Yogi in 1968. Under its working title of Jubilee. It was first considered for The White Album and then deferred. Then it was considered for Abbey Road, and deferred again.
The song ultimately came out on Paul's first solo album after the break-up of the Beatles (McCartney, 1970). Paul's "demo" to the rest of the group before the sessions for The White Album is found on Anthology 3 (1996).
When the song emerged on McCartney, a separate instrumental version was included, called Singalong Junk. This track was used in the film, Jerry McGuire. A similar instrumental track came out on Unplugged (The Official Bootleg) under the name, Junk.