Empty/corrupt iTunes library after upgrade/crash

Version 13
Last Modified: Feb 26, 2015 10:04 AM

Your iTunes library is empty, missing content, or you get the error "The file iTunes Library.itl cannot be read because it was created by a newer version of iTunes." even though you haven't downgraded iTunes.

 

(If you have downgraded then use these steps but choose an older backup file that corresponds to the build you are reverting to.)

 

Note that in iTunes 11 or later an "empty" library may show your past purchases with cloud links to stream or download them.

 

 

 

The following steps are similar in part to those given in the support document HT203225: No content shows up in iTunes after updating.

 

In the Previous iTunes Libraries folder (inside your main iTunes library folder) there should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library as iTunes Library (Corrupt) and then rename the restored file as iTunes Library. Start iTunes. iTunes should now show all your content, bar any recent additions to or deletions from your library.

 

RestorePrevious.png

 

The .itl file extensions may be hidden. If so don't add one when renaming files.

 

 

Note that you cannot simply double-click on the various files in the Previous iTunes Libraries folder to see what they contain. Doing so will start iTunes, but not change the library file that it opens. Either place the file that you want iTunes to open at the correct path, or hold down shift (option on a Mac) when starting iTunes and choose an alternate library file. See HT201596: iTunes: How to open an alternate iTunes Library file or create a new one for more details. In general you want your active library file to be in the main iTunes folder so file manipulation is usually the correct solution.

 

 

Alternatively, depending on exactly when and why the library went missing, there may be a recent .tmp file in the main iTunes folder that can be renamed as iTunes Library.itl to restore the library to a previous state. These files may be hidden so look up how to reveal hidden & system files on your particular version of your operating system. Make sure to use one comparable in size to those in the Previous iTunes Libraries folder. Certain third party software has been known to cause this issue from time to time, in particular some antivirus applications and Sony VAIO Entertainment Platform. See HT203288: iTunes creates an empty library file in Windows for details.

 

 

When the backup has been restored you can use File > Add folder to Library and choose the iTunes Media folder to add in any new media added since the backup was made, or use iTunes Folder Watch with its option to check for dead tracks on startup for a tool that can also remove deleted items, or fix some metadata when an item has been moved.

 

 

If your library is in a non-standard location another possibility is that the preference file that records which .itl file to open has been reset or corrupted. This may cause iTunes to open or create a library at the standard path of <User's Music>\iTunes. In this event, press and hold down shift as you launch iTunes to reconnect to the correct library file.

 

 

In a similar vein it is possible that a corrupt preference file may cause iTunes to fail at launch with one of these errors:

  • The file iTunes Library.itl cannot be read because it was created by a newer version of iTunes.
  • The folder “iTunes” is on a locked disk or you do not have write permissions for this folder.
  • The iTunes Library.itl cannot be found or created. The default location for this file is in the 'iTunes' folder in the 'Music' folder.

It may be worth trying the shift-start-iTunes method to actively select the .itl file that should contain your library.

 

 

Once you have recovered your library you should back it up. See the user tip Backup your iTunes for Windows library with SyncToy for a suggested strategy.

 

 

Should you be in the unfortunate position where you are no longer able to access your original library, or any backup of it, then see Recover your iTunes library from your iPod or iOS device.