Apple Music: Fix dead tracks/orphaned files, save playlists

I am using a M1 MacBook Pro running latest Tahoe.


I use Apple's music app. I know there are a number of dead tracks (listed in Music, but don't lead to an actual music file) and orphaned files (the reverse situation), and some duplicates.


The dupes are easier to take care of.


I have been struggling to get the dead track links and orphaned files corrected.


There are no apps I can find that do this. I also went down a rabbit hole with ChatGPT and its python scripts to fix this, but found the issues weren't fixed, so I restored my music backup and am right where I started.


Anyone know a reliable and accurate process or app that straights out the Apple Music app/database and removes dead links and imports any orphaned music files found?


Simply nuking the database file and re-importing all the music files is a non-starter as that would kill multiple play lists.


Thank you.

MacBook Pro 16″, macOS 26.2

Posted on Dec 15, 2025 8:03 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 15, 2025 10:17 AM

You can use File > Import... to add the contents of your media folder to the library. Anything currently not connected to the library will be added. This should not create any new duplicates but could potentially reveal any that already existed in the media folder.


See Duplicate songs in iTunes/Music - Apple Community for advice on duplicates.


See FixLinks - an AppleScript to repair broke… - Apple Community for a script that may be able to repair broken links if the tracks are in sensible locations.


See https://dougscripts.com/itunes/2021/12/updated-super-remove-dead-tracks-v6-1/ for a script to kill dead links that remain after you have repaired those that you can.


See Managing your Mac media libraries - Apple Community if your library has vestiges of an older iTunes library that you want to clean up.


tt2

1 reply
Question marked as Top-ranking reply

Dec 15, 2025 10:17 AM in response to jrmyeh

You can use File > Import... to add the contents of your media folder to the library. Anything currently not connected to the library will be added. This should not create any new duplicates but could potentially reveal any that already existed in the media folder.


See Duplicate songs in iTunes/Music - Apple Community for advice on duplicates.


See FixLinks - an AppleScript to repair broke… - Apple Community for a script that may be able to repair broken links if the tracks are in sensible locations.


See https://dougscripts.com/itunes/2021/12/updated-super-remove-dead-tracks-v6-1/ for a script to kill dead links that remain after you have repaired those that you can.


See Managing your Mac media libraries - Apple Community if your library has vestiges of an older iTunes library that you want to clean up.


tt2

Apple Music: Fix dead tracks/orphaned files, save playlists

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