Rebuild your iTunes library

Is your iTunes library acting buggy? Not crossfading or abruptly cutting to other songs midway through the current track? Do you have a bunch of missing songs, or duplicate files. File tagging acting wonky? Then it’s time to…

Rebuild your iTunes library

**Caution: This will result in duplicate smart playlists, get rid of ♥’s and play counts, reset all your settings like crossfading/soundcheck/import and export quality etc… and it will set the date added to the newly rebuilt library date. Also, depending on how dated this post gets, iTunes might remove other “ratings” type meta info as well, that isn’t actually stored in the mp3 files tagging. Personnaly, those things aren’t deal breakers for me but I thought I’d mention them.


Step 1: Make sure the following two settings boxes are checked:
Go to iTunes > Preferences > Advanced
->Select: Keep iTunes media folder organized
->Select: Copy files to iTunes media folder when adding to library

**Note: If these two settings were off before this point, you might have to wait a bit till it completes.

Once incorporating this way of adding media, I recommend you start deleting the files after adding them to iTunes if they aren’t coming from the iTunes store, otherwise your hard drive will fill up twice as quick.

Also, if you don’t set iTunes this way and you try to rebuild the library following my instructions but from external media folders, this procedure won’t work the same, and it might possibly result in a corrupt library full of issues/bugs. If you insist on storing your music files outside of the default iTunes folder, I’d recommend looking elsewhere for a solution to rebuilding your library.


Step 2: Export your library
In iTunes, choose File > Library > Export Library…. Name it and save it somewhere outside of your iTunes folder.
Quit out of iTunes.


Step 3: Delete the iTunes database
In finder or explorer go to Home/User > Music > iTunes
Delete everything except for the “iTunes Media” and “Album Artwork” folders. If you don’t see an “iTunes Media” folder, look through the existing folders and make sure you don’t delete the one that contains your music, podcasts, movies, tones etc…


Step 4: Add your music back into iTunes
ReStart iTunes, select File > Add to Library > “iTunes Media” or “iTunes Music” folder (the one that holds all the media like music etc, inside the iTunes folder).


Step 5: Import your exported database file
In iTunes, select File > Library > Import Playlist > select the database file you exported in step 2.

After the library database file finished importing you may get a notification that some files weren’t added because they couldn’t be located. That’s good, it means you removed missing files from your library and subsequent playlists.


Done.