There’s loads of information on the interweb about what to do when you accidentally delete all of your music from your computer, or wipe all the data from your iPhone. What there isn’t is much discussion about what to do when you accidentally blitz your iTunes library but have all the music still in place. I managed this by inadvertantly moving all of my music to the Trash. I subsequently realised and moved it all back to where it originally lived, but on opening iTunes I found that my library had been burned and there was no music left, nor iPhone apps. This worried me slightly, and so this post briefly runs through how I resolved the issue.
- Firstly, I moved all of the music files and folders back to exactly where they were originally located. This didn’t fix my problem, but I left things as they were originally, just to be on the safe side – if you mess about with the folder structure then all bets are off.
- I then opened iTunes and followed the instructions in Apple Support Article HT1451, “How to re-create your iTunes Library and Playlists“. To do this, you’ll need a copy of your iTunes library from prior to the point where you screwed it up. You do keep backups, right?
- Import the old library as described in the support article, and your music and playlists will magically re-appear as though nothing bad had ever happened.
- The above process also restored my podcasts, but if you’re having trouble getting those back then you may want to check out Apple Support Article HT2562, “Podcasts playlist in iTunes is empty“.
- To get your iPhone apps back, you have a couple of options. You could connect your iPhone, then right-click it in iTunes and select “Transfer Purchases“. This will copy all apps from the iPhone onto your computer. This obviously won’t include any apps which you don’t currently sync to the iPhone. You could also try using the “Check for Available Downloads” option in the “Store” menu of iTunes. However, a much better alternative presents itself…
- You’ll need to use a backup copy of your “Mobile Applications” folder, which is found in the “iTunes” folder (usually in /Users/<username>/Music on a Mac). Copy this to your Desktop. Click the “Apps” menu item in iTunes, and drag the contents of the “Mobile Applications” backup folder from your Desktop directly onto the iTunes window. This will copy all of the apps from the backup into your current iTunes library.
- Now that the apps officially exist again according to iTunes, you might think you’re in the clear. But you’re not. If you sync the apps now, the ‘new’ versions from iTunes will overwrite the ‘older’ versions on your iPhone, wiping all your app data in the process (or so iTunes says when you try and do it!). So that’s your [Angry Birds best score / VNC connection details] (delete as appropriate) gone forever.
- The good news is that you keep regular backups of your iPhone (if not, you really should), so you can just restore from your last good backup, and everything will be hunky-dory. All I did here was right-click on the iPhone in iTunes and select “Restore from Backup“. Note that Apple Support Article HT1766 suggests that if you just click the big “Restore” button, the iPhone will be restored to factory settings, not to your backup state, so beware! When you start the restoration, iTunes kindly informs you that only Contacts, Calendars, Notes, Messages and Settings will be restored, and then gets on with the job in hand. In theory, you should then be back to square one and able to carry on with your life as normal.
- In my case, this didn’t happen – when I tried to restore from the backup, I received an error message. My solution was therefore to click the “Restore” button (the one I warned you about above!), and restore to factory settings. Before it does this, iTunes asks whether you want to create a backup first – I said Yes. You can then do a full backup and when you first sync the newly-restored phone it’ll ask whether you want to restore from a backup. Choose the one you created a few minutes earlier, and you should finally be sorted. You’ll need to set up your sync preferences in iTunes again (i.e. which apps, music, podcasts, etc. you want to sync), but, other than this, everything then worked absolutely fine for me.