Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Since Upgrading, iTunes 12.7.2 Is Generating Hundreds of Temp Files

Since about Nov. 13, the iTunes on my MBA has been generating hundreds of TEMP FILES (format: “Temp File ##.tmp”). They are always generated in PAIRS, and the filesizes always match those of my iTunes Library.itl and iTunes Library.xml files (dated Nov. 11).


Deleting the temp files does not affect iTunes operation, but they just keep generating, multiple times over the course of each day.


It appears as though none of the metadata changes I have made since Nov. 11 or 13 have registered. Last play dates remain unchanged even after I have listened to a track. Changes to my playlists and my smart playlists disappear the next time I launch iTines. Self-updating smart playlists remain as they were in November.

After taking my MacBook Air to my local Apple Store for diagnostics and consultation, I today reformatted the SDD, installed a fresh copy of the MacOS, and reinstated all my apps, data, and settings from an external Time Machine backup. The minute I launched iTunes, it began generating the same temp files again, always in pairs.

Posted on Dec 16, 2017 6:46 PM

Reply
Question marked as Best reply

Posted on Jan 8, 2018 9:46 PM

The .itl file is the iTunes library data. That is where play counts & metadata is stored (some metadata can be pushed into files but not always).

The .xml is a copy of the library for other applications to read. That is only used if you try to load files from iTunes into other apps like iMovie, iPhoto or similar apps. iTunes should recreate a missing .xml file if it is removed.

See this for more detail…

About iTunes library files - Apple Support


I wonder why iTunes cannot overwrite the library files. I would try to find out if iTunes itself is faulty on your machine - create a new user account, add a few songs to it's iTunes and see if altering metadata works (and if play, playlists update etc). System Preferences > Users and groups is where you can add a new user, it can be deleted after testing.


Quit iTunes and look in Finder, 'File > Get info' on the 'iTunes Library.itl' file. Is that file locked? Do the permissions say you have read & write access to it?


What OS version do you have?

11 replies
Question marked as Best reply

Jan 8, 2018 9:46 PM in response to Ronald Palmer

The .itl file is the iTunes library data. That is where play counts & metadata is stored (some metadata can be pushed into files but not always).

The .xml is a copy of the library for other applications to read. That is only used if you try to load files from iTunes into other apps like iMovie, iPhoto or similar apps. iTunes should recreate a missing .xml file if it is removed.

See this for more detail…

About iTunes library files - Apple Support


I wonder why iTunes cannot overwrite the library files. I would try to find out if iTunes itself is faulty on your machine - create a new user account, add a few songs to it's iTunes and see if altering metadata works (and if play, playlists update etc). System Preferences > Users and groups is where you can add a new user, it can be deleted after testing.


Quit iTunes and look in Finder, 'File > Get info' on the 'iTunes Library.itl' file. Is that file locked? Do the permissions say you have read & write access to it?


What OS version do you have?

Jan 9, 2018 12:51 PM in response to Ronald Palmer

I don't know if the issue is related to the music being shared between multiple Mac user accounts, if it is still happening I'd backup then move the music back into one account. Permissions may interfere with creating & deleting the file if another user owns or is using that file. Fast user switching should be avoided to reduce the chance of the Library being locked by the other user.


If you have enough space to duplicate the library (at least temporarily) I would consider changing the Media location preference to be within the user account & then 'consolidate the library'. iTunes will copy or move files based on the preferences set.

https://support.apple.com/en-us/HT204668


I don't think iTunes is ever happy having 2 users modifying one library, I know many have tried to do that in the past (including via network drives) but I have never seen it work well & advise against it.


I'd also consider removing ClamAV via their own removal instructions, it may stop if it is the reason for this issue, reinstall it and see if it comes back afterwards.

Jan 15, 2018 10:08 PM in response to MadMacs0

MadMacs0 wrote:


Be sure and check out Set up Family Sharing on your Mac, which is Apple's solution for sharing an iTunes library.

Or use Home sharing…

Use Home Sharing to share iTunes content with other devices - Apple Support


That also allows DRM content within iTunes to be played on multiple Macs over the local network but does not integrate other store purchases (it won's sync apps on iOS devices etc). If you have only one iTunes account you can simply use 'iTunes music sharing' just to play files from another Mac (assuming you do not want to import those files to the library).


I'm glad you sorted it out, it's not clear to me why this happens but it may be when one user locks the library & another tries to edit it, permissions can also interact in unexpected ways.

Jan 8, 2018 9:45 PM in response to Drew Reece

Hi, Drew.


Thank you for suggesting that I test my iTunes in a fresh new user account. I did this over the weekend, and the iTunes software appears to work just fine. I imported a handful of music tracks from 3 or 4 albums, and then downloaded a couple of additional albums that I had previously purchased through the iTunes Store.


I opened the folder where the iTunes Library data files live, and then watched them update as the music tracks downloaded. I saw a .temp file being generated, and then quickly disappearing as it was incorporated into the existing .itl file—just the way it's all supposed to work. I still can't determine why this is NOT happening in my other two accounts.


One complicating factor: because I did not want my entire music library (more than 142 GB) to exist in multiple copies on both of my user accounts on the MacBook Air, I let all of my music track files and the Library data files live in the Shared folder (rather than the Music folder for either account). Over the past couple of years, this has occasionally caused some permissions issues, but I know how to "Get Info" for the folder, set that to "Read & Write" for all users, and then initiate the "Apply to Enclosed Items" feature. This has worked just fine for two or three years, and I was previously able to change metatdata in one account, and later see it reflected in the other.


All this changed in mid-November, and I still can't figure out the reason for the change. At some point that month, I upgraded to High Sierra, so got the new file architecture. I also upgraded to a new version of the anti-virus software that I use (ClamXav). And at some point that month, my Sonos wireless speaker system self-installed an upgrade as well. Any one of these might have triggered the problem.


I sincerely appreciate your insights with all this, and would welcome additional suggestions. At some point, I may need to hire a Mac-certified technician to make a house call.

Jan 14, 2018 9:25 PM in response to Ronald Palmer

Update—Problem Solved.


First, I want to express my thanks to everyone who contributed an idea here, and especially to DREW REECE and TURINGTEST2. Before dis-installing my anti-virus software, I e-mailed the technical support desk at ClamXAV for their input. The technician who responded was nice enough to read this entire thread, and he told me it was the first report he had seen of any possible conflict between the ClamXAV program and iTunes. He was all but certain that the ClamXAV did not trigger the problem, and based on his assurance, I decided to leave my anti-virus in place.


Once I moved my all my iTunes library files and media out of the SHARED folder and into the Music folder of the primary user account on my MBA, all the temp files stopped self-generating. So ultimately, it appears that the whole thing was a result of trying to play music from the same library though two user accounts. The fix was to put iTunes back where Apple intends it to be…in the Music folder.


That said, however, I still cannot understand why I had been able to give my iTunes a home for more than two years in that shared folder without any significant difficulty. The problem with all the temp files only began in early November, and near as I can tell that was directly after the upgrade to High Sierra reformatted the file structure on the drive. So what had worked before (accessing the music files from two user accounts) no longer worked.


In the end, once I got the temp file issue sorted, I made the decision to give my entire music library a new home on my desktop iMac. So I’ve spent the past few days sorting out that move—consolidating duplicate tracks, combining bits and pieces of music from a couple of seldom-used collections on other drives.


I’ve purchased and downloaded a couple of programs to help me in managing and streamlining my iTunes library in its new home, and so far I have found both of them quite useful (and well worth the purchase price). I bought LairWare’s Song Sergeant app, and another program titled SuperSync.


Again, thank you to everyone who posted suggestions here.

Since Upgrading, iTunes 12.7.2 Is Generating Hundreds of Temp Files

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