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

Feb 13, 2013 11:35 AM in response to Christoc

In the Songs view hold down shift and then use the menu options View > Show Exact Duplicate Items. How many are there?


If you see some where there is a working track and an otherwise identical broken track you can delete the broken ones from the list. You should then Display All and Show Exact Duplicates again to refresh the list.


For what remains select one of a pair of duplicates and use Get Info. Note down the exact path from the Summary tab. Now look at its partner and do the same. What are the two paths? If both files are in the same folder and have different names, or both paths are absolutely identical then my script will be OK to run. If the filenames are the same but the paths are different there is a slim chance that the two paths connect to the same folder in some fashion. This is where the current version of my script falls down. You should check a few different pairs to be sure you are clear what the pattern is.


When it comes to running the script you could select one albums worth of duplicates tracks first and process these first. If things behave as expected then you could do a larger selection but you don't have to do everything in one go.


tt2

Feb 13, 2013 11:57 AM in response to turingtest2

there are 105 when holding own shift, 384 when not shifting (all appear to be same song from diff album - so thats ok). - a lot less than there were! somehow>!?


no broken links for duplicates.


have deleted one of the tracks from the duplicates list and the other remains - so thats excellent.


given the smal no of dupes i'll do it manually... then i'll delete the recently added playlists.


so, all looking good - thanks for all your help on this, greatly appreciated.

Feb 17, 2013 12:59 PM in response to turingtest2

Hi tt2


I've just found your scripts, they are going to be invaluable in sorting out my music.


I've run DeDupe,and that got rid of a load (can't remember how many).


I've then run exact duplicates and that created a playlist of 297 songs, shich I've manually sorted out.


After this I have nearly 26,000 songs in my library.


I now have a list of 3000 songs (1500 duplicates) on track name and artist name from your DuplicateSong&Artist script. This appears mostly correct, with some duplicates with different genres, some songs duplicated from different albums, etc. Some appear to be exact duplicates apart from the file name/format.


I'm guessing there's no simple way to get rid of these?


Once I've done that, I want to consolidate both mine and my wife's library into a single library. They're currently on two separate computers. I think I've also got an old backup of mine, so I may add that as well.


What would you reccomend is the best way to combine these, and minimising the duplicates created?


Any thoughts appreciated.

Feb 17, 2013 2:15 PM in response to Alex Chard

Hi. The duplicate song and artist script shows which songs appear on more than one album. Whether or not you feel it is worth deleting any of these is a matter of opinion but none of my scripts are currently geared up for automating such a task. Personally I'm happy to have the same track appear on an original album and another compilation of the same group's work. If however I have partial albums then I might eliminate tracks that are already duplicated elsewhere in my library.


If you run through the first few pages of this thread I've offered suggestions for cleaning recently introduced duplicates simply by putting the display in Exact Duplicates mode, sorting on date added, and then removing those added most recently. This assumes there are no "better quality" choices to make and of course the recent additions will not have ratings, or playlist assignments so there is no real benefit to using my DeDuper script.


tt2

Feb 18, 2013 3:22 PM in response to turingtest2

turingtest2 wrote:


In the Songs view hold down shift and then use the menu options View > Show Exact Duplicate Items. How many are there?


I can't even get this to work! Nothing is different when I press/hold shift. Are these instructions only for Windows? I'm using a Mac with current 11.0.1 version of iTunes. I have yet to try your script, and I was attempting to manually delete duplicates (I have 1133 right now...). I've noticed though, that I'm not being prompted when I hit delete to decide if I want to keep the files. So I looked in Finder and they are all still there 😟 I spent quite some time "deleting" duplicates and it hasn't done a thing except erase the evidence from the duplicate list.

I did try holding down option + command + delete, that changed nothing. Also tried shift + delete, no difference.

I've spent so much time reading about this I may have had better luck manually managing the itunes folders in Finder then creating a new iTunes Library at this point...

Mar 10, 2013 5:48 AM in response to turingtest2

Hi turingtest2,


I was beyond excited to find out about your script, for I have been sloppy with my iTunes collection and really need to clean it up. I have removed all dead links with the library toolkit mentioned earlier and ran your script after using the ExactDupliacates script on Windows 11 (not the first build, but it still worked, but shift and show exact duplicates gave a similar number). we are talking 30,000 songs and 12,000 duplicates in two locations on an external harddrive here.

Unfortunately, I've tried twice, and still get an error (although I have done the whole giving myself full permission and disabling child control you mentioned... I read all 13 pages before crying for help here 😉 ).

My error reads
Line 452
Char 5

A0040203
track is not modifiable
Source (null).


It seems to appear when sorting out type 2 duplicates.
... help, please?

Mar 10, 2013 6:02 AM in response to Faux-Pas

Hmm... Assuming we're looking at the same version of the DeDuper script (and I've just downloaded the live version from my website to make sure) line 452 reads thus:


Tracks(J).SkippedCount=0 ' In case we don't end up deleting this item


One issue I know I have to address is the presence of cloud listings in an iTunes 11 library, so just in case that is part of the problem I'd go to Edit > Preferences > Store and untick Show iTunes in the Cloud purchases.


I can't think of any other obvious reason for that line to trigger an error, however you could replace it with the following:


On Error Resume Next ' In case next line triggers an error

Tracks(J).SkippedCount=0 ' In case we don't end up deleting this item

On Error Goto 0 ' Restore normal error handling


tt2

Mar 19, 2013 10:41 PM in response to Suavecito69

Help! I've just noticed that I have over 3,000 duplicates in my iTunes library. I did the whole "show exact duplicates" and started deleting them. This was pretty laborious as the date added tabe lists the same date for my entire library - the date that I added them all to this laptop and iTunes.

Problem is that all my files are on an external harddrive which isn't always plugged in when I use iTunes to sync my iPhone calenders daily (I guess from some of the comments that this is why the duplicates have been crweated), and when I delete the duplicates but keep the files as opposed to sending to recycle bin it moves the files from the ex harddrive to my laptop.

Unfortunately my laptop harddrive is almost full so this isn't an option - it also deletes the files from the ex harddrive!

Is there a solution to this?


Cheers.

Mar 21, 2013 4:41 AM in response to killian0007

killian0007 wrote:


I keep my music on an extral hard drive and just had to setup my iTunes on my new laptop. I thought I was very carefully when doing so but someone I needed up with over 25,000 songs duplicated. What program from your site is the best to use? And will it remove them from my hard-drive as well?


The DeDuper script is designed to scan for exact duplicates and clean out redundant entries in the database and, where appropriate, the physical files connected to removed entries. If you read through the opening pages of this thread you'll see I've gone into detail regarding the different types of duplicates that can arise and how they ought to be treated, however it only works with files that are connected to iTunes. If, for example, you have managed to generate duplicate copies of each file in their respective folders, with only some of these being show in iTunes, then everything would need to be imported into the library before my script could work on it.


Please take note of the warning to backup your library before use.


tt2

Mar 22, 2013 7:06 PM in response to Suavecito69

HI there, first let me say I've spent time in your wonderful city, as well as, Scotland, Ireland and Wales. Beautiful country.


Back to business. So I downloaded DeDuper and ran the program and now I have a playlist named exact duplicates which processed 4,426 tracks and 2,082 were deleted. I deleted the exact duplicates playlist, But when I go run the program again, they're still there.


What am I doing wrong?


Thx Debbieon the other side of the ocean.

Apr 14, 2013 7:47 AM in response to Suavecito69

Very interesting utility. However I get an error message stating "there was an error deleting file...". I have tried on two seperat computers with completely different itunes libraries. Both are Windows 8 with all patches, and both have the newest iTunes 11.0.2.26. The duplicate songs are correctly removed from the library but not from the file system. The file system is an internal drive in laptops. Can it be because my itunes media library on both computers are on a D: partition? I.e. in D:\Musik\iTunes\iTunes Media. Any other suggestions? Thanks

Apr 14, 2013 9:39 AM in response to kpedersen

I'm guessing that the fact that your music folder is called Musik means your system isn't running in English. The file deletion routine invokes commands from the right-click context menu as this seems to be the only way to have deleted files go to the recycle bin. In English the command appears as Delete, with the D underlined since it is also a keyboard shortcut. The text the script looks for is "&Delete"


To make it work for you we need to change line 491


If File.Verbs.Item(I).Name="&Delete" Then


so that it includes your local word for delete from Windows Explorer's context menu, with the & placed before the character that is underlined.


I recommend Notepad++ for editing scripts.


tt2

Apr 15, 2013 3:32 AM in response to turingtest2

I was looking for a solution regarding this issue and I found it in this article: iTunes – Delete Duplicates. Indeed there are endless resources regarding this issue and none of them worked for me. The tool referenced in the above article can remove duplicate songs not only from iTunes, but from your entire computer. It performs real audio analysis and can find similar songs even if they are not marked with tags. I strongly recommend this tool as it was th only one of this type that really works. There is a free demo available and the tool costs just about 20 bucks.

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.