You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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

Why did my music just disappear from iTunes library?

I don't understand what happened. My music files just disappeared from my iTunes Library, why? However, the music folders for each album is still in iTunes music folder. Also, the music in my iPod folder is still there, too. Before you ask I did not move my library folder or point to a different library folder location.

Posted on Aug 1, 2017 1:51 PM

Reply
17 replies

Aug 9, 2017 12:26 PM in response to turingtest2

turingtest2 wrote:


  • As far as I am aware neither Windows Defender or Microsoft Security Essentials have caused iTunes Library damage. Stuff you've run in the past, or anything you need to run manually isn't relevant. McAfee has at various times been one of the main culprits.
  • The machine is clearly powerful enough to run iTunes, so that shouldn't be an issue. It isn't a Sony VIAO, which once had some notable iTunes breaking software.
  • Do any of your playlists exist on a device? I have a script that can extract them. See ImportDevicePlaylists.
  • See this post on Re: Duplicate Songs.
  • On Windows View > Only Downloaded Music will suppress cloud content. If the cloud tracks are duplicates of files recently imported they may disappear after restarting iTunes, or if you sign out of the store and then sign in again. Otherwise download what you want and hide what you don't. See Hide and unhide iTunes Store, App Store, or iBooks Store purchases - Apple Support.
  • I don't see a Previous iTunes Libraries folder inside the iTunes folder, which would normally be there. If you run third party clean up tools perhaps one of them has been overly aggressive, or is it simply because you have a newly created library in that location? What about the old one? What happens if you select the computer in Explorer and then search for *.itl ? I'm clearly a little unusual in having a bunch of test libraries but I found nearly 90 .itl files. I still think it ought to be possible to reactivate your lost library if you can find the right file.


tt2

  1. Never had issue with McAfee and iTunes. Perhaps I was just lucky.
  2. I know my iPod nano 3rd generation has a couple of playlist but not the one I really need. The one I need is the playlist of what is on my wife's iPods (nano and shuffle). Thank god I have the iTunes set to only sync manually so that when I connect her devices they won't automatically erase what she has, I hope. She would be really ****** 😟. I have it in *.m3u and *.wpl formats but I can't convert them to txt (csv) format. I will check my laptop. I will review the "ImportDevicePlaylist" and "Duplicate Songs" post when time permits. Thanks in advance for that information.
    1. Unfortunately, as I suspected, my laptop has an empty Music folder (no iTunes folder) because as I said at the beginning my Music folder (which held my iTunes folder and all music files under the iTunes Media folder is gone. If you will remember, I told you I returned the Music folder back to the hard drive using my XPS8300 (desktop) and laptop also used the same Microsoft account, meaning the same OneDrive. This why I had my iTunes and Music library on OneDrive. So I could always have access to my music and it would automatically be synced regardless of which computer initially bought the file onboard. This approach has worked for several years until the last iTunes upgrade which unfortunately I didn't discover until just before I initiated this stream (post) a few days back.
    2. I checked out the link Hide and unhide iTunes Store, App Store, or iBooks Store purchases - Apple Support. It is very helpful except I am a bit confused. There is only one music item on the All list that is not on the In My Library List. But when I checked my library the album is there. Oh well that is a minor issue because when I returned to my library almost all the clouds had disappeared except to a few.
    3. Still, I don't understand why if a title (song or album) is in my library on the computer why does iTunes want to include the cloud version in my library too?
      1. If I download the cloud version will it overwrite the version I have on my computer?
      2. If download a selection (song or album) from the cloud and it is not already on my computer will it be added to my computer and will it go, the "Downloads" folder or the iTunes Media>Music folder?
  3. Re: On Windows View; I am not sure I understand "only downloaded music will suppress cloud content". Do you mean I have to download the music with the cloud and down arrow icon in order to prevent it showing as part of my library? If so I don't get it. Yes, the clouds tracks are duplicates of files already in my library but they haven't been suppressed. If you mean by recently imported added to library by selecting File>Add Folder to Library..., then the answer is yes they are recently imported. I will send a screenshot of my iTunes library sorted by song. Perhaps that will clear it. Also, I have signed out and signed into the store numerous times but the cloud files are still showing along with the copy on my desktop (xps8300) hard drive.
  4. You didn't see a Previous iTunes Library because there is none there (I always have view hidden files enabled). I will assume there is none there because I had to recreate or more accurately re-add the music folder to iTunes.
    1. I did search across entire computer (this computer I'm using now the xps8300) for *.itl, itl and only file that came up is current 'iTunes library.itl'. I also did a search on my laptop and found nothing at all.
    2. Will also send another screenshot of the iTunes folder including the Details List that shows when that folder is selected.
  5. Back to the playlists and itl files. I might if I'm lucky have copies of them on an old backup drive. Hopefully they haven't been removed.

User uploaded file

As you see below, iTunes is telling me I have lots of files missing although they are actually in the Music folder and including some that are on the cloud. Which is why I asked what happens when I download from the cloud.

User uploaded file

Ok, I given plenty enough for today.

Again I want to say thanks for hanging in here with me on this. I two major issues I still need to resolve.

1. Can get my playlist back? I have to research my old backups for this.

2. Can I move my iTunes folder back to OneDrive once I've resolved (pro or con) the rest of the issue?

Aug 9, 2017 5:50 PM in response to ggivensjr

  1. AV can sometimes cause issues, for some users, on some systems. It isn't a case of X always causes problem Y.
  2. Reimported playlists only work if the tracks are on the same paths as they were when the list was created, though in some cases relative references can be used. It may also be possible to use search and replace operations to update the lists to correct for any change in the paths, assuming there is an obvious common edit required. My ImportDevicePlaylists script works without access to the filepaths by creating a metadata fingerprint for each track in the library, then rebuilding the lists that are on the device by finding each track's match in the library, where one can be found.
    1. I take it there is no copy of the .itl files in One Drive somewhere?
    2. The matching of content in the library with purchase history isn't always perfect.
    3. Again iTunes may not always link an imported file with the reference in your purchase history. In some cases it may be expedient to delete all copies, unhide the purchase if it has become hidden, then redownload.
      1. No, it would be a duplicate copy. If there is an existing file with the relevant name the new copy will end up as ## <Name> 2.<Ext>. If the other entry is listed with an exclamation mark then when iTunes is restarted it can sometimes be the case the both entries now work, but deleting one and recycling the track would break the other. (What I call logical duplicates.)
      2. The Downloads folder is a temporary area where downloaded files are built up before being renamed and moved into their final place in the library. It should normally be empty except when downloading. It will sometimes hold the legacy of an interrupted download. It is safe to delete when iTunes is closed.
  3. The album (actually just one track) The Look of Love is in the cloud, and the display is set to show All Music.
    User uploaded file
    changing to View > Only Downloaded Music and the item disappears.
    User uploaded file
    The cloud tracks are still in the library, just not shown. Ideally resolve inconsistencies by getting iTunes to recognize existing content, or redownloading from the store, or hiding anything still causes a problem and/or isn't wanted.
  4. Again, seems odd if the problem was originally caused by updating iTunes that the folder isn't in the same folder as the lost database was.
    1. Is there another computer your library was previously attached to?
    2. If you can find multiple library files then file size and date modified are the useful properties to show.
  5. See this post on fixing exclamation marks: Re: iTunes wont reconnect to music file. Normally one would only expect to see broken links if you've moved the media after it has been added to the library, or you've moved a non-portable library to a new path.


  1. If you can find a valid .itl that holds the playlists it should be possible to repair broken links and bring the library up to date with any new media.
  2. Possibly. Again I don't really know what went wrong there. However you should aim to keep an offline backup of the entire library in a portable layout for easy recovery in future.


tt2

Aug 8, 2017 7:42 PM in response to ggivensjr

  • As far as I am aware neither Windows Defender or Microsoft Security Essentials have caused iTunes Library damage. Stuff you've run in the past, or anything you need to run manually isn't relevant. McAfee has at various times been one of the main culprits.
  • The machine is clearly powerful enough to run iTunes, so that shouldn't be an issue. It isn't a Sony VIAO, which once had some notable iTunes breaking software.
  • Do any of your playlists exist on a device? I have a script that can extract them. See ImportDevicePlaylists.
  • See this post on Re: Duplicate Songs.
  • On Windows View > Only Downloaded Music will suppress cloud content. If the cloud tracks are duplicates of files recently imported they may disappear after restarting iTunes, or if you sign out of the store and then sign in again. Otherwise download what you want and hide what you don't. See Hide and unhide iTunes Store, App Store, or iBooks Store purchases - Apple Support.
  • I don't see a Previous iTunes Libraries folder inside the iTunes folder, which would normally be there. If you run third party clean up tools perhaps one of them has been overly aggressive, or is it simply because you have a newly created library in that location? What about the old one? What happens if you select the computer in Explorer and then search for *.itl ? I'm clearly a little unusual in having a bunch of test libraries but I found nearly 90 .itl files. I still think it ought to be possible to reactivate your lost library if you can find the right file.


tt2

Aug 8, 2017 3:33 PM in response to turingtest2

I use Windows Defender AV along with manually running SuperAntiSpyware and CCleaner. I've been doing this ever since Windows 8. Actually used SuperAntiSpyware and CCleaner with Win7 too but used McAfee AV then.


If it matters this particular computer is a Dell XPS8300 x64 16GB RAM Processor Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz, 3401 Mhz, 4 Core(s), 8 Logical Processor(s) , 1GB HD.


I finally go iTunes to build my library but I had to File>Add Folder to Library... looks like I have everything except my playlists which is what I was really trying to save. I was able to get one playlist back using the import function because I had saved it as txt (CVS I presume). I tried to import others but iTunes wouldn't recognize either the xml file and I didn't have the others as txt.


The other thing is I now have several duplicates. Most are listed as not found but some are because there is a copy on the cloud. I still don't understand why I have cloud files. I realize that I have automatic cloud storage by virtue of having purchased music, books, etc from the Apple Store but why can't I turn that off.


Here is screen shot of my Music folder which I moved by to the local hard drive, i.e. C:\Users\....\Music.


Thanks for hanging in there.

User uploaded file

Aug 3, 2017 2:11 PM in response to ggivensjr

If you've purchased anything from the iTunes or App stores then you have access to a feature that has been called iTunes in the cloud at some point. See Availability of iTunes Store, iBooks Store, and App Store redownloads - Apple Support to see what is available to redownload. These items will normally display in your library automatically so that they can be streamed (where applicable) or downloaded on demand. Particularly if the library has been reset and you signed into your Apple ID.


If you tried the steps suggested and they haven't worked look in the Previous iTunes Libraries folder again. Is there another dated file that matches your attempt to repair things? If so then you did it correctly, but it has failed again in the same way, and you should reboot and try again. If not then I suspect you made a mistake following the repair instructions. For example adding a .itl file extension when file extensions are hidden from you.


tt2

Aug 4, 2017 3:11 AM in response to ggivensjr

If iTunes cannot find the ITL file when it starts up, and if the active library file location is set to the default path of <User's Music>\iTunes\iTunes Library.itl then it will behave as if it had just been installed for the first time and create a new empty library. If the library is stored on any other path and is missing iTunes will prompt you to choose or create a library.


Generally the repair steps for missing content after an upgrade or crash involves one file copy operation, and two renames. It shouldn't be necessary to reinstall iTunes. Rebuilding the ITL from the contents of the media folder will add back all the items stored locally, but you will have lost all playlists, ratings, date added, play counts, etc. Rebuliding by importing a full library XML can bring back everything but date added, however it is common for the XML file to have been reset at the same time as the ITL. Backups are the key to recovery.


I hadn't linked your other thread what folder can i find the itunes library.itl? with this one last night but now that I have perhaps the issue is that iTunes has forgotten which ITL file it is supposed to be accessing. Have you made One Drive pick up the iTunes library from its usual location of User's Music, or did you move the library into a One Drive folder (I've used Dropbox, but not One Drive) and then reconnect to it by shift-starting iTunes? (See Open a different iTunes Library file or create a new one - Apple Support). As given in the original link iTunes may sometimes reset to looking for the library at the default path, in which case you can use the same shift-start iTunes method to reconnect to the desired library file.


If you download content while the library is in a broken state, but connected to the media folder that still has your files, then iTunes will download new copies of the files and add " 2" to the filenames rather than overwrite what is already there. Should you then decide to add the whole media folder to the library you will see the duplicates.


tt2

Aug 6, 2017 3:38 PM in response to ggivensjr

I'm not entirely clear if the whole library is stored in One Drive, or just the media.


Reinstalling iTunes does not fix a damaged library.


Options are to restore a pre-upgrade copy of the library, either the backup made by iTunes in the Previous iTunes Libraries folder, one made using third party software (does One Drive capture multiple versions of files like DropBox?) or by rescanning the media folder with File > Add Folder to Library. The last method should import all of the media, but some may not be categorized correctly and you lose ratings, play counts, playlists, date added and other details.


iTunes expects every file added to the library to stay in place. There are ways to move the data around from one location to another, but it has to be done in a way that iTunes is either in control of, or can easily adjust to. Details in Make a split library portable.




Almost every activity in iTunes causes the database to be rewritten. The steps are that iTunes writes out a new temporary copy of the file, deletes the original, then renames the temporary copy to replace the original file. Any process that attaches to the file system to watch for activity has the potential to disrupt this process. That includes both anti-virus software and live backup or cloud sharing tools, and it occasionally happens with iTunes itself when it updates the internal structure of the database, making an archive copy of the current library file in the Previous iTunes Libraries folder before it does so.



As given in both my user tip and the document If you don't see your entire library after you update iTunes on your Mac or PC - Apple Support the recovery steps are to rename or delete the existing active database file, copy in the archived version, and rename it so that it becomes the active file.



tt2

Aug 6, 2017 8:58 PM in response to turingtest2

"As given in both my user tip and the document

If you don't see your entire library after you update iTunes on your Mac or PC - Apple Supportthe recovery steps are to rename or delete the existing active database file, copy in the archived version, and rename it so that it becomes the active file."


I did the above, it didn't work.

As for whether OneDrive captures archives or backups or whatever you said, it does because as I've said repeatedly I've used OneDrive as the place all my files reside for at least 2 years. Perhaps the latest iTunes update is prohibitive to using OneDrive as the location for the iTunes library location.

Apparently you're the you're ultimate authority on iTunes in this forum so tell me is it possible to keep the actual media files in one location and the library in another. As an example I'm a photographer and I use Adobe Lightroom (LR) as my DAM. LR allows for your catalog database file *.lrcat and associated database files to be held at one location e.g. external hard drive, internal hard drive

(except a NAS), and the actual media files i.e. images to be at another location typically an external raid or standalone external hard drive. LR can do this because the catalog basically only references the location of the actual images. I would think the geniuses at Apple would have figured out how to that by now.

Aug 7, 2017 1:11 AM in response to ggivensjr

Yes, you can split out the media folder to a different path while leaving the catalog (*.itl) and support files (*.itdb & Album Artwork folder) either on the original path, potentially elsewhere. Again, details are given in Make a split library portable, and NAS may work but can also fail bigly. As I said, moving the media needs to be done either by iTunes itself (which copies rather than moves, and leaves you to clean the originals) or in a way that it is able to adjust to automatically. The issue at the moment would seem to be that you're not connecting to the right database (or if you are it is being corrupted each time iTunes tries to update it). Moving the media files now won't help the situation.


Perhaps you can post a screenshot of the contents of your iTunes folder and the Previous iTunes Libraries folder inside it.


What anti-virus software do you have? It may help to temporarily disable it while trying to fix the issue with the library.

Is the iTunes library folder monitored by One Drive? If so then again temporarily disabling the service could help.


tt2

Aug 3, 2017 9:20 PM in response to turingtest2

Ok I get it but if I have music, apps, books, etc I've purchased from Apple Store which are available to download, then why can't I get my library to work? Since I can't get iTunes to recognize or load my library if I download a previously purchased item where will it go, to the downloaded folder instead of into my library?

Also, not to muddy the waters but isn't there a way to rebuild an iTunes library itl without completely uninstalling and removing iTunes? What about deleting all itl files? Will deleting itl files cause iTunes to rebuild the library?

Finally, I can't find an answer to the question, can itunes folder be located on MS OneDrive since Windows 10 sees OneDrive as just another location on the hard drive?

You are obviously knowledgeable on all things iTunes.

Aug 6, 2017 2:23 PM in response to turingtest2

I really don't think OneDrive is the issue as my music library has been there for at least a couple of years. At this point, I have moved everthing, i.e. itunes\media\music, back to my user directory on my hard drive. Before going to the trouble of uninstalling/reinstalling I will try the shift launch to point to a specific itl file because just moving it back to hard drive didn't help. I'm pretty much over iTunes but my wife and I have iPods. So if it doesn't work I'll uninstall and reinstall. I kniw most Windows programs that use libraries will automatically rebuild the the library file if the old is deleted or renamed, e.g. Lightroom will rebuild your catalog if you point it to your images location and do an import, but apparently Apple doesn't work that way.

Thanks for help. If you care I'll post whether I get if fixed and what fixed it if applicable.

Why did my music just disappear from iTunes library?

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