Tags:

Is there a way to delete the files in my iTunes folder that aren't actually in my library?
June 10, 2010 7:28 AM   Subscribe

I have iTunes set to both “Keep iTunes Media folder organized” and “Copy files to iTunes Media folder when adding to library.” Somewhere along the way I deleted songs from my library without also deleting them from my computer, which means I have a 14GB discrepancy between the files in my iTunes folder and the files actually included in my library.

If I uncheck both “Keep iTunes Media folder organized” and “Copy files when adding to library,” move all of my music in my iTunes folder to another folder, then recheck both settings and select “Consolidate files” for all the music in my library, will that work to copy only the files actually in my library back to my “iTunes” folder? I don’t want to confuse iTunes and end up with 2 copies of all the songs in my library with half of them with a gray exclamation point next to it. I also don’t want to somehow lose any of the information in my library like play count, ratings and playlists.

If it’s relevant, I’m on OS X, iTunes 9. (Sorry if my question isn’t clear. I had some trouble figuring out exactly how to explain what I mean.)
posted by cosmic osmo to Computers & Internet (10 answers total) 2 users marked this as a favorite
 
That won't do what you want, because the "Consolidate Files" function is for times when iTunes knows about music strewn all over your computer. If you move your music in the Finder and then run "Consolidate Files," it's not going to know where your music is and it will just give you the exclamation points.

What I would do is drag all the music from the Finder back into iTunes. It will scan and load any songs that weren't in your library. Next, make a smart playlist with a setting to show all files added Today. Then you delete them from the Library (I'm pretty sure if you do Option-Delete on a file in a playlist, it will remove it from the Library instead of just the playlist) and say "yes" when it asks if you want to move the files to the Trash.

If you don't REALLY want to delete those songs, just be careful to take the songs out of the Trash and put them someplace safe.
posted by bcwinters at 7:42 AM on June 10, 2010


Clarify for me, if you don't mind: the files you deleted from your library but not the hard drive of the computer itself - do you want those recovered or do you want those gone?
posted by komara at 7:43 AM on June 10, 2010


Clarify for me, if you don't mind: the files you deleted from your library but not the hard drive of the computer itself - do you want those recovered or do you want those gone?

I would like to delete them, so if there's a way to figure out which ones are on my hard drive but not the library without moving stuff around, that would probably preferable to the scheme I came up with (which looks like it won't work, anyway.)

I was thinking that when I consolidate the library after I moved everything out of the iTunes folder, iTunes would only copy back into the folder the files I selected in the library, but it looks like that won't do what I want.
posted by cosmic osmo at 7:53 AM on June 10, 2010


bcwinters, just to clarify--should I keep "Copy files..." checked the whole time?
posted by cosmic osmo at 7:57 AM on June 10, 2010


This should work. Keep “Keep iTunes Media folder organized” and “Copy files to iTunes Media folder when adding to library” checked all the way though this process.

1. Change the default location of your Library in preferences to, say, ~/Desktop/temp_itunes/

2. Consolidate library. iTunes will copy all the music it knows about in ~/iTunes/Music to the your temporary folder, but will leave the orphanned files.

3. Delete ~/Music/iTunes (which will delete the orphanned files along with your original copy of the library).

4. Change the default location back to ~/Music/iTunes.

5. Consolidate library again.

6. Delete ~/Desktop/temp_itunes/

After step 2 and 5 you will have two copies of your library, so you'll need the hard drive space for that. Path names assume you're on a Mac. Adjust as necessary.
posted by caek at 8:27 AM on June 10, 2010 [1 favorite]


p.s. Googling "Orphaned iTunes Music" and variations on that turns up some alternative methods, including some AppleScript solutions.
posted by caek at 8:29 AM on June 10, 2010


I've had to do what caek describes, and it worked for me.
posted by Threeway Handshake at 10:43 AM on June 10, 2010


So I did what you described, caek, and I'm still seeing a 12GB difference between my Music folder and the size of my library (just the Music folder--not Album Artwork, Apps, or any videos). Any ideas?
posted by cosmic osmo at 10:58 AM on June 10, 2010


Do you have a lot of podcasts? I don't think podcasts show up in the count/time/size display on the bottom of the iTunes window.
posted by flaterik at 12:15 PM on June 10, 2010


*Important caveat of caek's advice: Don't delete your iTunes library files. They're sometimes inside ~/Music/iTunes
posted by schmod at 2:14 PM on June 10, 2010


« Older I smoked half a joint yesterda...   |  What is a possible explanation... Newer »
This thread is closed to new comments.