How to Remove duplicate files from your iTunes media library

Contributor Icon Contributed by bulletcatcher221 Date Icon August 22, 2006  
Tag Icon Tagged: Entertainment

Are you tired of starting up your iPod and starting your playlist to find the same song playing over and over caused by duplicate files in your Itunes library or in windows media player? Here are a few tips to help.


If the only problem is duplicate *tracks* in iTunes (not duplicate files on the hard drive), the solution is easy – use iTunes built-in “Find Duplicates” feature to find and remove the duplicate tracks. There are also scripts on Doug Adam’s iTunes Scripts website to perform this. I synchronize my Libraries all the time (between Mac OS X and Windows, actually) and run into this a lot.

However, if the *files* (on the hard drive) are duplicated (because of different folder/file names), then the solution is tedious and requires lots of temp disk space.

Manual Solution:

1. Use iTunes built-in “Find Duplicates” feature to find and remove the duplicate tracks in iTunes – this doesn’t affect your drive yet).
2. Highlight every track in your iTunes Library (still in iTunes, not on your drive) and then drag the tracks from iTunes to a new Folder on your drive.
3. This will make a complete copy of your Library (without any duplicates)
4. Delete every track in iTunes and every file in your original Library on your drive.
5. Then, either move the contents of your new Folder to your Library folder and drop the Library Folder back into iTunes, or just tell iTunes that your Library has moved to the new Folder.

You’ll now have a new Library with no duplicates.

Some other solutions…

Enter the shareware iDupe (it’ll set you back $8). It claims to dedupe your music collection intelligently by looking at more criteria than Apple’s offering and allowing you to adjust certain settings.It helps tremendously in removing duplicate files from your music library. I find that the default setting does a good job of identifying duplicates, erring on the side of being slightly conservative IMO. (This is a ‘good thing’ !)

The user can choose to delete duplicates from the currently selected Playlist, from the entire Library, and from the hard drive. The docs suggest that it works best with limited chunks of files (under 2000), so I have created a “TEMP” Playlist and move 3-500 tracks at a time into that list. It’s not exceptionally fast at deleting files, but it does the job like nothing else I’ve tried.

Previous recipe | Next recipe |
 
  • Anthony Robinson
    I think we all know about the find duplicates feature...the point is who wants to sit and manually select every duplicated and delete them one by one. Is there a magic button that says "find all duplicates and delete them for me?"

    I've got easily over 400 dupes and do not relish having to sit and manually remove them.
  • The "Show Duplicates" feature (iTunes -> File -> Show Duplicates) only guesses files that are the same. Frequently, it will show two tunes that are similar but not exactly the same-- Live versus album, for example. Because of this, it's always going to be dangerous to try to develop some automatic way to remove duplicates using this feature. Thus, there is not a "find all duplicates and delete them for me" magic button.

    Several paid software packages exist that will help with this. If somebody posts a free solution, we'll be glad to publish it.
  • hanna
    From the help:

    Choose File > Show Duplicates to find every instance of a song from the same artist from any album in your collection. For example, the same song could appear on the artist's album and on a movie soundtrack.

    Press the Shift key and choose File > Show Exact Duplicates to find multiple copies of the same song (if, for example, you inadvertently imported the song twice).
  • Bryan
    Thank you SO much! this just blew my mind
  • sysadmn
    Another PITA about Apple's Find Duplicates is that it does not detect when two entries point to the same file. It will happily let you move the file to the recycle bin. Then the next time you access the remaining entry, you get the "Cannot find file" dialog. Way to go Apple - comparing paths (or, on OSX inodes) is sooo hard.
  • I think everybody agrees with this. I think that's why there is such a huge collection of software out there that tries to fix the problem with dupes. I was really sad that apple did not take the time to improve iTunes with version 8 instead of just adding more and more features.

    Removing duplicates safely would help a ton of people. However, the genius feature means that apple will make more money... You can see where the priorities are. :(
  • Joe
    Thanks a bunch for this, i am relitvely new at itunes and was unaware of this feature...
  • joshua
    use the program duplicate finder. you can select weather to find the duplicates of the same size or name in the thing with artist. i use it all the time and i love it.
  • Luke
    What I did was copy the duplicate play list, then copy it into a folder I made. All the duplicates were on one side of the folder because it had the name and a number, and and all the normal ones were on the other. All i had to do was delete the left side and it was done.
  • Gavin
    not sure how that took care of the dup files in your itunes library
  • dfgsdfgdsf
    GREAT idea Luke. Simple and fast. This should be stickied at the top. thanks all for helping me with my dup issue.
  • joe blow
    when you do that first manual step, just select send to trash or recycle bin, respective to your os, and skip all the rest.

    that is unless you're not sure if the itunes library file duplicate points to the same file on your drive.

    itunes is funky. in it's native library, you only see links to the actual files. sometimes when you're moving between machines and trying to get your library organized, you might inadvertantly make dupicate "itunes library links," but not duplicates of the actual files.

    thats when his manual method comes in handy. by not selecting the "send to trash" option after selecting your duplicates and hitting delete, but selecting the "keep files" option, you only delete itunes duplicate links. then, once all your dupe links are gone, he has you tell itunes "hey! take all these links and copy the linked files here" by selecting the entire library and dragging it to another folder.

    tada! itunes made a copy of your library without dupe files or library links.
    delete your old library, delete all links in itunes, then import the copied file.

    if you like, you can tell itunes to copy them into the itunes folder, meaning it doesnt link to the folder you're importing, but to a copy in a different folder.

    by doing that, you get a nice neat itunes organized folder system complete with a nice neat dupe free itunes library.


    sorry if i repeated a few things.... but i'm sure someone wanted to know something here..... whether or not they will ever come across this, i do not know :)
  • Sam
    I'm running a laptop with windows so couldn't run Doug Adam's scripts for Mac. Another way to remove duplicate itunes entries is:

    1. Remove all tracks from itunes (select all and press delete)
    2. Select not to remove the actual music file
    3. When your library is empty again, select 'file \ add folders to library' and select the MyMusic folder

    It didn't even take that long because the files are all in the right format, itunes just has to find them again. N.B. I dont purchase music at the itunes online store so dont know how this will affect your bought mp3 tracks.
  • hanna
    But you lose the original Date Added context.
  • Ryan
    Another easy way is to simply uninstall and then re-install iTunes. You can then import a single library instead of dealing with duplicate files. I recently changed my music directory to a different folder and had all of the same files imported to my library again, though only the recently imported files are playable. Really irritating, but I think this will fix it.

    Anyway, less chance of loss in the process of dragging and dropping. And it's free.
  • Jordan Hewitt
    i wrote an autohotkey script to select every other song in the "show duplicates" window very very quickly.

    ===================================
    SetTitleMatchMode, 2

    ^t::

    WinActivate, iTunes
    Sleep, 1000

    Loop {

    SendEvent {Control down}

    y = 94
    Loop {
    SendEvent {Click 1000, %y%}
    if (y > 930) {
    break
    }
    y += 34
    }

    PixelGetColor, done, 1237, 926
    if (done != 0xBDBDBD) {
    break
    }

    SendEvent {Click 1237, 935, 50}

    }

    SendEvent {Control up}

    return
    ================================================



    Very simple to use, but you will have to adjust the numbers to fit your screen size, unless you are in 1680x1050 like me. You also of course need to download autohotkey, but i highly suggest that for anyone anyway.
  • efef
    I have a g15 keyboard so I have a macro button, when do I type this in just while I am looknig at itunes?
  • jon
    i made an auto hot key, it goes to the tray, but nothing happens.
  • jim
    Be careful about iDupe and don't get duped--It's for Macs ONLY. If you have Windows do not buy it, you'll just be making an $8 donation.
  • woodenbrainconcepts
    iDupe is for Mac OS X only, as stated on the product page. It will not work on Windows. There is no intent to dupe anyone, unfortunately sometimes Windows users do not read the stated system requirements. Please understand that many software companies have no refund policies unless the product doesn't work as described, because software is not a physical product that can be returned. I regret the confusion it sometimes causes.
  • Moleculo
    It is NOT stated on the products page
    http://www.woodenbrain.com/products/products.html
    It is below the Alternate trial download which is below the Main trial download which is below the BUY NOW button. I was linked there from a tech site which was discussing how to rid itunes of duplicate files.
    I was in a hurry to find a cure and clicked BUY NOW even before downloading the software. When I asked for a refund I was told that his "friend" would sell me windows software at some nebulous discount price somewhere under $35
    Thanks for nothing.
  • reactez
    Personally I use iDeduper on Windows.
    http://www.ideduper.com
  • efef
    I followed the above steps for manual removal except I used an automatic itunes library dupe remover so I didnt have to sift through 488 dupes, program was called "Dupe eliminator for itunes" Ran that then followed the steps above. Vista 63bit
  • Emily
    How much does that cost though? Is there anything free?
  • Dan
    Why is iTunes creating the duplicates to begin with? This is so incredibly frustrating. This software is so crappy. It has done this on every computer I own. If I didn't own an iPod Touch I would get rid of iTunes all together. Can't you Apple software developers get this simple piece of software working correctly?
  • Pralz
    If i remember correctly... iTunes is QUICKTIME's child... Apple just bought QuickTime to own iTunes. It's not Apple who created iTunes, it is QuickTime.
  • Brett
    I am struggling with another twist on the dupe problem. I recently installed a network drive at home and want all computers/notebooks to be able to access the same iTunes music folder on the network drive, for their iTunes library.

    I set about transferring the files that had built up on 2 of the computers onto the main drive, plus the collection on my iPod, which had become separated from its mother due to a drive crash (alot of the songs were already dupes of the other libraries). The problem is, the songs from the iPod have copied directly to the main folder, not in organised into albums, whilst the ones from the computers are saved within their respective albums.

    I've ended up with no less than 5 dupes in some cases, in a 30Gb library. I have moved the default folder referenced by iTunes to the network drive, however when I try to 'add to library' it still tries to copy them back to my local HD, which I am trying to avoid (and besides don't have the space!). How can I set up iTunes on each of the computers to only import links to the songs on the network drive to its library, and also remove the dupes??
  • Pellet
    LOL how wrong you are Pralz, iTunes is created exclusively by Apple and Quicktime was created exclusively by Apple from the start.
  • jackthompson
    not quite.

    Quicktime has been an Apple product for almost 20 years now, but iTunes was originally SoundJam MP, a program apple purchased in 2000 and modified into iTunes.
  • Emily
    Actually it's probably because you need to uncheck a box which automatically makes duplicates of every song you save in itunes, you have to Go to Edit -> Preferences.
    Switch to 'Advanced' tab.
    Uncheck 'Copy files to iTunes Music folder when adding to library'.
  • B
    I agree. It shouldn't matter who own's it. The problems needs to be fixed. I have researched this issue and how to resolve for myself and all i get it the same question with the same answer that no one is at fault and still not the appropriate way to fix the initial problem of why itunes/Quicktime has a problem of getting duplicate file destinations on there. We understand if we have duplicate songs due to different albums but what is the reason that the same song from the same album arrive into our library. There has got to be a way that as the songs are uploaded, the program recognizes duplicates and will ask if we really want to. I notice it does this when there already are games on there. It asks if we want to replace that. Is there some basic resolution on settings that may be causing this problem that the average joe's(joe-ets for the ladies) is not aware of?
  • Emily
    Is there anything free or for UK users (not sold only in US) and does the first method you mentioned get rid of dead links as well, because I have about 4000 of those somehow!
  • Christa
    Just a warning: the hyped program "iFix" to de-duplicate itunes hasn't loaded on any of my or my friends' computers; it just crashes before install.
  • Sean
    I ran an 8 double one D file dumper and it seemed to clear the problem up in a jiffy. The only problem is that I have to engage the manual choke to get my monitor to work in cold weather!
  • tonybaloney
    your "easy" approach isn't very easy if you have 20 GB of duplicates.
  • clunkyd
    how about 293gigs in a 587 gig library? Im so frustrated and overwhlmed!
  • tstname
    I Tried... Audio Comparer but did not find how it works(poor design)... in that case Duplicate Finder 2009 is the winner for me.... its so simple to find and remove duplicate files in this program...
  • mollyjmoody
    manual method worked great, but lost all playlists (they are all blank) and trying to see if any way to recover. help
  • tyler
    don't listen to any of these just do this:

    1) HOLD SHIFT- and press file
    2) Magically a new option comes up labeled, 'show exact duplicates'
    3) voila delete all the unwanted ones, such as unrated ones, in a massive group.
  • clunkyd
    but how do you delete in a massive group?
  • T3
    Simply amazing job. You probably just saved me two - three hours. I would've been deleting each duplicate if it wasn't for your simple manual way of fixing it. Thanks a million.
  • manologalban
    You can also export the show exact duplicate list and upload it to http://mDecks.com/mdelduform.php
    And then get mDelDupFile back that will delete all your duplicates but leaving one original. You can decide which one you want to keep (best quality, smallest, etc)

    That way you don't have to go through all your duplicates deciding which ones to keep or delete.
  • Name
    iDupe shareware will take care of it easily. i had 3000 duplicates, no way was i going to go through manually.
  • mark333
    I get the removal of duplicate files but when they are of different extension types, which extension type should I keep so that ITunes doesn't make copies again so it can recognize them. I have several different types such as MP3, M4p, windows media audio file, etc.. In other words, what is the best file extension type for ITunes to read?
  • jpdevries
    This is a very inefficient solution but a solution nonetheless. I'd like to find or write an iTunes plugin that does nothing but auto-select even (or odd) items in the list.
    Then the steps would be:
    Show Duplicates
    Run Plugin to Auto Select Every Other Track
    Delete the selected tracks
  • jpdevries
    This is a good script also, it consolidates your duplicates into a Dupes playlist. Once the script runs you can select everything and say add a DELETE Grouping property to all the songs, and delete em!
    http://dougscripts.com/itunes/scripts/download....
  • max_123
    I am using Audio Comparer to delete duplicates from iTunes library. Works fine for me. You should give it a try.
  • Tor I.
    Another reason for duplicates can be if you have upgraded songs to iTunes+ and chose to keep the old files. Then "Find duplicates" will list both, and you can look in info (Command+I) to see which is the crappy protected 128 kbps version and which is the unprotected 256 kbps version you want to keep.
  • avisioli
    The first of many many answers to doubles which made some sense and of practical use. Many thanks AVisioli MD
    avisioli@ntlworld.com
  • Si
    The tedious method listed above (copy out, copy in) doesn't work in iTunes 9 on Windows. It exports duplicates as trackName.mp3 and TrackName1.mp3
  • vinchete
    Anyone try Automator yet?

    Because iTunes automatically adds a "1" or "2" to the end of a duplicate file name, you can use Automator to move those files from your iTunes library to another folder. After the files are physically gone from your iTunes music folder, you can use any number of means to remove the dead/broken links from your iTunes library.

    Step #1 - Open Automator, and first use "Find Finder Items" in your iTunes Music Folder to find file's whose names end with " 1.mp3", " 1.m4p", " 1.m4a", or " 1.wav", etc. I thought it important to use 'ends with' and the file extension, rather than 'contains' and " 1." to prevent accidents, but either would work I suppose. I also added the space before the number one for the same reason.

    Step #2 - "Move Finder Items" to a new folder that you created, let's call it "Temp Trash". Automator has a "Move Finder Items to Trash" function, but my music files are stored on a server and they'd be deleted immediately. I wanted to put them in a temporary folder so I could look through them one time before I deleted them permanently.

    Repeat for " 2.mp3", etc., even " 3.mp3" if you have to.

    FYI: Automater won't replace existing file names unless you check that box, so even if you find 1,234 songs in your search, it might not delete all 1,234 if some have the exact same file name (but are stored in different folders, for example). Check that the number of files found in Step #1 match those moved in Step #2. You can check the box to overwrite file names, or create another folder and run the Automator task again for the duplicate duplicates.

    WARNING: I found that songs ending in "...Part 1.mp3" would get snagged in this function, so after I was done I opened my temporary trash folder in a finder window and searched for songs containing the word "part"...saved 8 songs/shows that I otherwise would've removed accidentally.


    After I felt I was done, I chose to remove all the songs from my iTunes library (but NOT the files!), and then re-import my iTunes Music folder (it'll take all night).

    I started with 10,760 files + duplicates, and moved a little more than half of that to my temp folder (including files ending in "2" and "3", and duplicate track names hiding in different folders). This method should have gotten most, but tomorrow morning I'll "show exact duplicates" and manually remove whatever is left.

    Cheers,
    V
  • allancass
    This is what I use and it is great and supports a lot of audio formats:
    Audio Dedupe:Duplicate MP3 Finder
    is an innovative tool that can recognize duplicate audio files even if they are stored in different file formats and not marked with ID3 tags.
blog comments powered by Disqus