Removing Files from iTunes Library after a manual delete
Published on 16 Mar 2009 at 10:42 am.
No Comments.
Filed under itunes.
Removing Songs from iTunes that no longer exist
If you manually delete files for any reason from your iTunes library the library itself will still have the file. This is great if the file is on an external disc that happens to be disconnected, but if you deleted the file permanently, you will also want it out of your library listing.
Yesterday I described an easy method for manually removing duplicate files in an iTunes library on the QNAP 509 or Mac OS. That was only half of the problem. The duplicate files most likely still exist in your iTunes library. One of the most frustrating thing about the duplicate files is that when viewed inside iTunes they look identical to the originals, even tho on the disk they may end in 1.mp3 2.mp3 and may be found in hidden directories. Of course you want to keep the original file names, without the extra information. By performing the dupe delete linked above you can now easily fish out in iTunes which files are the originals and which were dupes. iTunes will do this for you if you delete the library xml file, or you can do it yourself.
The Quick Way – Delete the iTunes Library xml file
Simply delete the iTunes .xml file, most likely found in ~/Music/iTunes/iTunes Music Library.xml
This will make iTunes re-index your whole library and is the fastest method if you had a lot of dupes.
However you will lose some information about the files that remain so I don’t reccomend this method.
The Slow Way – Pound ‘Next’
If you don’t feel like trusting iTunes to re-index your library, or you only had a few duplicate songs you can fish out which of the duplicate files in your library you deleted and remove them from the library yourself.
1. Open iTunes and select your Music Library
2. While holding down the Option key go to the File menu and select “Show Exact Duplicates”
3. When your list of duplicates loads, highlight the first file in the list hold down Control (or use right click) and click the file, use the context menu to select “Get Info”. You may get a message about the file being missing, if it asks if you want to find the file yourself select No.
4. There should be a “Next” button in the bottom left corner of the window that appears.
5. Simply keep hitting Next and as you do the duplicate files that are now missing because you deleted them will start getting marked with a ! before the name.
6. command click to select all the files with the ! by them and then control click and select “Delete” It will ask if you are sure you want to remove them from the library, but unlike when the file exists, it will not ask if you want to delete or keep the file.
One thing I noticed in all this is it seems to me when copying your library from one location to another, the duplicates that are created when re-importing are usually the purchased items. Next time I do something like this I am going to skip copying the purchased items and let iTunes re-download them for me.