How to bulk delete duplicate playlists in Apple Music?

How do I remove hundreds of duplicate playlists that Apple Music created?


While I have been using iTunes for years, I only recently joined Apple Music and in syncing things with my iPhone, it created hundreds of duplicate playlists, usually but not always, by adding "1" or "2" behind the playlist title.


I have no idea why this happened but as Apple Music does not (nor ever has) support batch playlist management, I don't know how to go about removing these by bulk vs. tediously deleting each playlist one-by-one.


[Re-Titled by Moderator]

Original Title: Remove duplicate Apple Music

MacBook Pro 14″, macOS 26.0

Posted on Nov 17, 2025 4:14 PM

Reply
Question marked as Top-ranking reply

Posted on Nov 18, 2025 8:10 AM

I'm sure I must have written a post on here about this somewhere previously, but I cannot find it for the life of me now. I wrote an AppleScript that will cycle through all playlists removing those that end with a space and then a number. If you have numbers over 50 that need to be removed you would need to edit the Max variable that I included, primarily to preserve playlists that might be intentionally named for years. You should also heed the warning to backup your database before proceeding just in case it cleans more than you want it to. The script is available here - KillIndexedPlaylists - in a compressed version of the .scpt AppleScript file. You can look at that in the Script Editor app on your Mac if you want to see how it works. You can run it directly from the Script Editor or move/copy it to ~/Library/Music/Scripts/ which should make it appear in the Music menu bar under an additional icon allowing you to access scripts from within the Music app.


tt2

2 replies
Question marked as Top-ranking reply

Nov 18, 2025 8:10 AM in response to Oliver Wang1

I'm sure I must have written a post on here about this somewhere previously, but I cannot find it for the life of me now. I wrote an AppleScript that will cycle through all playlists removing those that end with a space and then a number. If you have numbers over 50 that need to be removed you would need to edit the Max variable that I included, primarily to preserve playlists that might be intentionally named for years. You should also heed the warning to backup your database before proceeding just in case it cleans more than you want it to. The script is available here - KillIndexedPlaylists - in a compressed version of the .scpt AppleScript file. You can look at that in the Script Editor app on your Mac if you want to see how it works. You can run it directly from the Script Editor or move/copy it to ~/Library/Music/Scripts/ which should make it appear in the Music menu bar under an additional icon allowing you to access scripts from within the Music app.


tt2

Nov 17, 2025 4:50 PM in response to Oliver Wang1

OP here:


From what I can tell, most of my playlists were organized INSIDE a folder but Apple Music duplicated 2-3 versions of the same playlists, outside the folder lists, and now it's all cluttered. Part of the problem is that if I wanted to delete the duplicate playlists manually, I can't be certain if the duplicated playlists are from inside a folder or if they only exist outside a folder. As you can imagine, this is a massive headache to organize now.


What can I do to clean up my library now?

How to bulk delete duplicate playlists in Apple Music?

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