Removing Apple Music duplicates on Mac without messing up external drive files
My Apple Music is on a Mac Mini 2023 M2 Sequoia with the Music Files on a USB-Connected external hard drive. Everything has been fine for a long time but now I have duplicates of practically every song (some times as many as 4 or 5 dups of the same song). They appear as duplicates on my Apple Music Library and as Duplicate Files in the Artist/Album folders on the external hard drive. If I delete the duplicates on the external hard drive (example will be: song_1.aif, song_2.aif and song.aif with 1 & 2 being deleted) they still show up three times in the Apple Music Library. If, instead, I delete them from the Library, and after I'm down to just two duplicates remaining in the Library, if I delete just one of the last two the .aif file disappears from the folder on the external hard drive. It puts it in the trash. The song remains in the Music Library and it actually plays even though it's missing from the folder on the hard drive. When I "get info" for the song and select "File" it shows that the file playing is playing from the trash. I have tried everything I can think of and I either have the song disappear or they remain as duplicates in the Library and/or the external hard drive folders.
I tried deleting some of the duplicate songs from the external hard drive and then did the Organize Library, Keep Media File Organized, and Copy Files to Media Folder When Adding to Library in various orders and either nothing changes or it adds the duplicates back to the external hard drive.
Even if I can successfully find a way to do this so I end up with one song in the Library and one corresponding song on the external hard drive, I have thousands(!) of songs to fix.
Does anybody know a work-around? Is there a third-party software I can purchase and install to simplify and speed up this process?
I can live with duplicate files on the hard drive but I can't have duplicates in the library. I have a few iPads wall-mounted around my house and I use the Apple Remote app to select songs to play. It's a total nightmare to select an artist and then an album and then see the first song listed four time, then the second song listed four time etc. etc.
Help!
[Re-Titled by Moderator]
Original Title: Apple Music Files a Mess
Mac mini (M2, 2023)