Today I upgraded from iTunes 8 to 9, and when the new version launched, all my podcasts and iPhone apps were gone. iTunes had moved them (along with some of my music files) to a folder called "Previous iTunes Libraries."
Dragging the quarantined folders over to the new folder and relaunching iTunes didn't work. Renaming the library file and relaunching didn't work. (I'd hoped that would force iTunes to rebuild its database.) Even relaunching while holding down Command and Option didn't work, though it did apparently put iTunes into some kind of safe mode.
Syncing my iPod Touch with iTunes didn't restore the apps either, probably because I'd also installed the 3.1 firmware update. Instead, that erased all the non-Apple apps from the iPod. Double whammy.
In the past when I'd lost apps due to sync errors or using the iPod with multiple computers, I'd just redownloaded them — there's no charge for that — but I had no patience to do that for the 150-plus apps that had gone walkabout.
Turns out you can add wayward apps to your iTunes library the same way you add song files.
So I tried an experiment: importing the folder of apps the way you import music files. I selected
File > Add to Library, pointed to the folder of apps, and iTunes loaded them back in! The technique worked for my 858 old podcast episodes too. I thought they might end up mixed in with the music, but they populated the Podcasts section of iTunes instead. I had to click the Subscribe buttons, but all the old episodes were there.
Lesson learned: Upgrade one component at a time — and try a few hacks before starting over completely. One might just work.