iTunes Library keeps deleting itself

I've got iTunes 12.8.0.150 running on an HP-brand Windows 10. Every week for the past four months, sometimes twice a week, my entire iTunes library deletes itself. The files themselves still exist in the iTunes folder, but they are no longer represented in the program itself. This includes songs, podcasts and podcast subscriptions, films, and TV shows.


I have logged out of my Apple account and then back in, and have reauthorized my computer. I keep a copy of my library's .xml file backed up so I can restore the library, including playlists, but even then, I have to re-subscribe to podcasts and re-sync all the files (including photos) to my iPhone 7. What is going on?

null-OTHER, Windows 10, HP-brand laptop

Posted on Aug 3, 2018 7:19 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 4, 2018 5:34 PM

You should exclude the whole folder from real-time scanning. When iTunes updates both the .itl (which is your library database) and the .xml (for third party support), or other library files, it starts by writing out a .tmp file to replace it, then it deletes the relevant file and renames the .tmp version. Your AV is blocking this last action, corrupting the library. The .tmp files in the iTunes folder may have different names, depending on what is already there, but you don't want to exclude the AV from scanning .tmp files in general.


Once you have repaired the iTunes Library with either the most recent .tmp file, previous iTunes library file, or from backup then, with iTunes closed, delete all of the .tmp files that remain.


tt2

Similar questions

6 replies
Question marked as Top-ranking reply

Aug 4, 2018 5:34 PM in response to Desulto

You should exclude the whole folder from real-time scanning. When iTunes updates both the .itl (which is your library database) and the .xml (for third party support), or other library files, it starts by writing out a .tmp file to replace it, then it deletes the relevant file and renames the .tmp version. Your AV is blocking this last action, corrupting the library. The .tmp files in the iTunes folder may have different names, depending on what is already there, but you don't want to exclude the AV from scanning .tmp files in general.


Once you have repaired the iTunes Library with either the most recent .tmp file, previous iTunes library file, or from backup then, with iTunes closed, delete all of the .tmp files that remain.


tt2

Aug 4, 2018 2:04 PM in response to turingtest2

Unfortunately I can't to figure out how to add folders to the whitelist. Google search results for adding folders show me results for Malwarebytes rather than ByteFence (apparently the research team for Malwarebytes considers ByteFence to be nagware). I hesitate to uninstall the program, though, since I already have it. As much as ByteFence is probably affecting iTunes, I'd rather deal with that than malware.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

iTunes Library keeps deleting itself

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.