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.

how to delete duplicated songs all at one time?

I would like to get help deleting duplicated songs, I do not know how they got their in the first place.

Windows 7

Posted on Aug 28, 2011 10:29 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 6, 2017 10:14 PM

Some how I got duplicates of my library on iTunes and to get rid of all the new duplicates I went to the library I looked for the date the new duplicate songs were added to the library then I went to columns and where you see Artist, song,

bit rate, time, etc and added 'date added' once that's done click on the box enclosing 'date added' and you will see all songs added by date. Proceed to the last one of the songs with that date press command to highlight it then scroll all the way to the first song and press 'shift' to highlight all of the songs added on that date then simply press delete.

you will be asked if you want to delete these songs...That's it.

483 replies
Question marked as Top-ranking reply

Apr 6, 2017 10:14 PM in response to Suavecito69

Some how I got duplicates of my library on iTunes and to get rid of all the new duplicates I went to the library I looked for the date the new duplicate songs were added to the library then I went to columns and where you see Artist, song,

bit rate, time, etc and added 'date added' once that's done click on the box enclosing 'date added' and you will see all songs added by date. Proceed to the last one of the songs with that date press command to highlight it then scroll all the way to the first song and press 'shift' to highlight all of the songs added on that date then simply press delete.

you will be asked if you want to delete these songs...That's it.

Aug 28, 2011 8:22 PM in response to Suavecito69

iTunes has two modes for displaying duplicates. The first is accessed via File > Display Duplicates and lists all tracks in the current playlist where the same track title occurs more than once. This is, more often than not, a rather loose definition of the term and can bring back obviously different songs, e.g. studio and live versions of the same song, the same song recorded by different artists, or by the same artist but on different albums, or completely different songs that have nothing in common but their title.


A more useful feature can be found if you hold down the SHIFT key and then select File > Display Exact Duplicates. This gives a list of all tracks where more than one track has essentially the same metadata, name, track no., artist, album, etc. (I'm not sure what the exact criteria are for an exact duplicate as far as iTunes is concerned, but it's good enough for most needs).


There are three types of files that can show up as exact duplicates:

  1. Multiple library entries for the same physical file
    These can occur if your media location is temporarily unavailable, e.g. due to a disconnected external drive, iTunes becomes aware and marks the tracks as missing, you then reconnect the drive and add the media again. iTunes won't recognize that the files are already in the library and will create duplicate entries.
  2. Multiple copies of the same physical file
    This can happen if you have "Copy to iTunes media folder when adding to library" enabled and accidentally add the same folders from outside of the iTunes Media folder into your library.
  3. Different copies of the same track, in different formats or bit rates
    This can happen if you decide to rip a CD that is already in your library on a later occasion or, for example, decide to create MP3 versions of some existing AAC files and then don't remove the originals.

Note you could also have files which have the same audio data but different metadata, e.g. the same album ripped twice but with a slightly altered album title, however there isn't an obvious way to highlight these within iTunes.


Once you have used the Show Exact Duplicates feature you can set about deleting all but one copy of each duplicate file. If all the duplicates have recently been added into your library then you could sort the list on the date added column, select a range of tracks with SHIFT-click and delete all the recent entries. If the duplicates have been added into the library at various times then sort the list by album or track name, select all but one of each group of matching tracks with CTRL-click and delete the selection. Probably best to work one screenful at a time.


Of course the issue isn't quite as simple as it seems. If the duplicates are of type 1 then you want to delete the tracks from the library, but not delete or send the underlying files to the recycle bin as there is only one copy of each file referenced by the duplicate entries. For tracks of type 2 you do want to delete the duplicate physical copies leaving one remaining version. For files of type 3 you probably want to decide which of the two or more copies you want to keep, the smallest to take up less room, the largest because it is the best quality, the MP3 version because it is the most portable or more than one because each has their uses for you.


By now you should have some idea of why deduping is not a trivial issue. Of the three types I have described it turns out that cleaning up type 1 duplicates is quite easy to automate. I've written a script called DeDuper which can go through a selection of tracks, spot those with the same path and remove the redundant entries. As a bonus it retains the entry with the earliest date added value, adds in the play & skip counts from the deleted entries and sets the last played/skipped dates to their most recent values. Although the script would work on the whole library it will be much more efficient to use the iTunes Show Exact Duplicates tool before running the script. You should also backup your library or, at the very least, the iTunes database iTunes Library.itl before running the script. Chances are you have type 2 duplicates and the script is of no use to you in its present form...


I hope to extend the script over the next few days to cope with type 2 and type 3 duplicates, ideally making the distinction between the two types, handling type 2 automatically (hopefully moving the removed files to somewhere they could still be restored from if required) and prompting for the user to choose which file to keep in the case of type 3. Again metadata would be merged. Hmm, just realized I need to do something about rating too.


tt2

Feb 12, 2013 9:35 AM in response to Christoc

Lost & Found Playlists

  1. Create a playlistcalled Found (Use File > New > Playlist, then name it Found)
  2. Select everything in Music (use the Songs view) and drag it into the Found playlist (it may take some time to count the tracks that are to be dropped).
  3. Create a smart playlist (Use File > New > Smart Playlist) add a second rule by pressing the + symbol and edit the playlist so it matches the illustration below. Once you click OK to save the rules you can name the smart playlist Lost.


User uploaded file


tt2

May 12, 2014 8:49 AM in response to Hipsolicitor

The DeDuper script referred to in this thread is written by me and is free for anyone to download and use. There is some guidance on using my scripts at the top of the scripts page, but here is a more detailed description.




A step-by-step guide to using the DeDuper script


  1. Start by backing up your iTunes library. See this backup tip if you don't already have a strategy for this.
  2. Download the script if you haven't done so already. This is a direct download link to DeDuper that you can right-click on for download options: Save to your downloads folder, desktop or somewhere else you can find it easily when you want to use it.
  3. If it isn't already shown press CTRL+B to enable the menu bar, then from the Songs view hold down the SHIFT key and from the menu bar select View > Show Exact Duplicate Items. (Clicking the Same Album button seems to work if you forget to hold shift.)
    You should get something like image below, click the image to see it in more detail. Click on the heading of the Album column if needed to change the sort order and use CTRL+J to enable artwork if desired.
    User uploaded file
    Note there are 4 copies of the first track. In the second album only tracks 1 to 4 are duplicated which is why only those tracks from that album show up in this view.
  4. To test how the script works select a sample of tracks rather than everything. In my case I'm going to select the Adele albums only by clicking on the first track, then scrolling to the last one, and shift-clicking that. This highlights all the songs between the two selections. Like this:
    User uploaded file
  5. Double-click on the script to run it. Because you've downloaded this script from the web you will probably get a warning message asking if you want to open it.
    User uploaded file
    Obviously this is where you need to decide if you trust my advice. If you do click Open. If you want to prevent repeat warnings you can uncheck the box that says "Always ask..."
  6. Assuming you click Open you should now get a dialog box like this:
    User uploaded file
    Review the text, cancel if the numbers don't agree with your intentions, otherwise click Yes.
  7. Depending on your settings for User Account Control and Internet Explorer you may get a progress bar displayed as the script evaluates the duplicates, otherwise you will just get the findings:
    User uploaded file
  8. Click Yes to remove the duplicates. When they have been removed you will get a results screen:
    User uploaded file
    Note that all the duplicates of Adele's tracks have been removed leaving the originals behind.
  9. If you're happy the script does what it is supposed to press CTRL+A to select all the duplicate tracks and run it again. Click the Done button at the top of the display to exit from the show duplicates display when you are finished with it.


Note that it is worth testing the script on one or two albums first to get a feel for it and also to determine if you get shown the progress bar. If not you need to be prepared for the script to take time processing the library with no feedback as to how it is getting on, or easy way to interrupt the operation. Tips for allowing the progress bar to work are at the bottom of the scripts page. All smart playlists are recalculated with each removed track so run time is probably a power relationship to library size, i.e double the size of the library and the script could take 4 times as long to run. If the progress bar won't display it might be wise to work with smaller chunks, e.g. start with all artists that begin with A, then B, etc. rather than tackling the whole library in one hit.


Once the library has been cleaned of the duplicates check it through before deleting what has been put in the recycle bin. When you are happy nothing has been deleted that should not have been you can update your backup.


tt2

Sep 27, 2011 11:38 AM in response to turingtest2

Yes, I believe that's the problem. You are probably right, it could happen getting playlists from Macs, too. I made a quick hack and it fixed my problem, but I don't know anything about VB, and I'm sure my hack isn't complete.


This is all kind of silly, anyway. iTunes should ignore duplicates if they are in exactly the same place in the filesystem. Oh well.

Oct 12, 2013 9:51 PM in response to Jaco_Crash

Hi,


  1. Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library. For a Mac use Alt or Option while accessing the menu to reveal the Show Exact Duplicates command.
  2. All copies of all tracks with the same details are listed. Either the same song name and artist for the regular feature, or the same song name, artist, album, track no. & disc no. for exact duplicates. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created. If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the trash.


My script is for Windows, Dupin Lite should do something similar on a Mac, or tackle the duplicates by hand. Whichever way you choose backup before you start in case you do something too radical and need to recover.


tt2

Jun 22, 2014 4:35 PM in response to turingtest2

Thank you for the incredible amount of work you have put making iTunes palatable for the rest of us. My iTunes library is on my home NAS. I read through most of this thread and then downloaded DeDuper today from your website on a test of 25 duplicates:

I get this error:

Line: 503

Char: 55

Error: The track is not modifiable

Code: A0040203

Source: (null)


Thank you for your assistance!

TomQA

Sep 17, 2013 1:31 PM in response to Eddy23

Backup your library.


You can download the Deduper script by right-clicking on this direct link:http://samsoft.org.uk/iTunes/DeDuper.vbs and then clicking download, save as or whatever your browser offers.


You should be able to double-click the downloaded file to execute it. Windows will probably give some kind of warning about running the file, if you accept it, then it should run. It relies on Windows Scripting Host which is normally installed and enabled by default. This page of the DeDuper thread has some stuff on installing/enabling it if needed.


When you run the script it should look something like this.


User uploaded file

(Click on image to enlarge)


And the prompts should lead you through the rest of it.


tt2

Sep 19, 2013 10:06 AM in response to turingtest2

Had a slight mishap today with my iTunes library... Long story short: I backed up an old .itl file when I reverted my iTunes back to 10.7 (I had installed 11.0.4 yesterday for the iOS 7.0 update and hated the interface). Using the old .itl file somehow created duplicate tracks everywhere.


I can get the DeDuper script to work, but only on the manual/preview setting in which I have to approve every single delete. My library is currently displaying at 190 GB (roughly 35 GB of that are duplicates), thus I would really, really like to have the automated part to work! The error that displays is below:


User uploaded file

Nov 8, 2013 1:35 AM in response to turingtest2

turingtest2 wrote:


Not being familiar with the software I'm clutching at straws too, but those "pop-up information tips" might be where the software offers to help if you add new media and warns when you try to delete it...


tt2


I think this is not going to be possible with the software I have conflicting with the scipt and iTunes etc 😟. I tried to deselect the pop-up information and did get a smaller box here;


User uploaded file


So this looks like a VLC file so I configured iTunes for .m4a and got the same box but with the iTunes 'logo'.

how to delete duplicated songs all at one time?

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