How to dedupe your iTunes collection

Eric PughOctober 25, 2006

Update 5/25/20 Rinse appears to be gone, or just out of date and bad. Not sure, with Apple Music etc if we dedupe these days!

Update 4/24/2011. TidySongs is now Rinse! Same great product, but new vendor with a deeper music database that seems to match better. I’ve updated the links.

Update 5/16/2010. When I am old and grey, I am going to tell my children about the most popular blog post I ever wrote, this one about iTunes deduping! I finally have to pass the baton of deduping on to

TidySongs, a product from a company that coincidentally is in my home town of Charlottesville, Virginia!

While iTunes provides a “View Duplicates” function, it intentionally doesn’t provide anything to help you delete all the duplicates. Apple’s theory being that you should be very careful with all your music! And an automated system can’t detect betweend duplicate songs, and just two versions of the same song.

There are a couple AppleScripts out there that can help find all your duplicates as well. However, then you still have to manually go through the playlist and delete them.

I unfortunantly have duplicated 780 songs, adding an extra 1.8GB of music files! As you can imagine, manually fixing this was not going to happen. Fortunantly I was able to programmatically solve this. I used the AppleScript Corral All Dupes to find all the duplicates, and made a minor tweak to it so that it would put into my “Dupes” playlist only the second version of the song. Just fire up Script Editor, and then open up the Corral All Dupes applescript application.

Find the line that looks like this:

— copy the list of dupes to the "Dupes" playlist
repeat with y from 1 to length of dupesRef

And change the line to look like this

repeat with y from 1 to (length of dupesRef) - 1

This will take all but the last last duplicate and put it on your Dupes playlist.

Then, once it is done, just highlight them all, and hold down Option and Delete. The Option key makes iTunes delete the actual music files, versus just remove them from the playlist. This was a tidbit that took quite a bit of searching to find!

PS, Corral All Dupes is painfully slow, but making this hack was much easier then in the PERL enabled version.




More blog articles:


Let's do a project together!

We provide tailored search, discovery and personalization solutions using Solr and Elasticsearch. Learn more about our service offerings