Complete reset of Music.app?

Even after installing MacOS 26, I’m seeing a lot of the same Truly Frustrating problems I’ve seen before. In at least one case, I think I can narrow down the set of actions to reproduce it. (The other cases are clearly Heisenbugs.) In at least another case, it could well be there’s some residual cruft in my library (transferred from a couple of earlier computers over the years.)

So does anyone know what to remove in ~/Library to get Music.app to the state it would be in from a fresh install of Mac OS? I suspect some of the files/directories will be part of what Mac OS locks down, so I’d have to remove contents, rather than just cleaning up anything with “music” in the file/directory name…

Launch Music, and check Music > Settings > Files > Music Media folder location. This is where your media (e.g. music files) are stored.

The Music Library probably is in ~/Music/Music/Music Library, but it doesn’t have to be. If it gets modified when you open Music, then that’s the library.

Besides that, there are a log of com.apple.music files and folders, including:

  • ~/Library/Preferences/com.apple.Music.plist
  • ~/Library/Caches/com.apple.Music
  • ~/Library/Containers/com.apple.Music.MusicStorageExtension
  • ~/Library/Containers/com.apple.Music/MusicCacheExtension

It’s that list of preferences and related stuff in ~/Library that I’m looking for. Despite my previous efforts trying to remove ~/Library/com.apple.music/* , it’s been clear that’s not sufficient to get Music.app back to a completely ‘virgin’ state. I’m surprised how spread out Music.app’s stuff is across ~/Library

Something you could try.

Download the free “AppCleaner” if you don’t already have it in your toolbox.

Open AppCleaner.

Now open the Applications folder as well.

Drag the icon for Music.app into the AppCleaner window. AC will gather up all the user files related to the Music app (including the app itself).

Now, UNcheck the Music app itself (it’s probaby “protected” anyway), but make sure there’s a checkmark next to everythign else.

Click the remove button.
Does this do it for you?

OK, I tried AppCleaner. No joy. It marked a couple items as not removable (~/Music is a protected folder, but I previously emptied its contents.)

After AppCleaner ran, I launched Music.app It showed basically the state before I ran AppCleaner, i.e. all the music metadata, the most recently played items, etc.

If I get the patience, I’ll call Apple Tech Support, although I’m not sure that would be worth the hassle for this. I’m sure it’s beyond what their Tier 1 people know.

The music database is a bundle/package with a “.musiclibrary” extension (extensions are typically hidden). The name of the default library is “Music Library.musiclibrary”.

If you delete it, that will delete the database referencing all your music and playlists. It will not delete the actual tracks - they are stored in the media folder (location can be read from the Music app, as @mschmitt mentioned, above).

If you don’t want to delete the database, you can just create a new one. Hold down Option when launching music, and you’ll be presented with a dialog that you can use to select an existing library or create a new one:

After creating a new Music library, you can (if you wish) point it at your existing media folder and import the contents.

Or you can start from scratch with a new media folder. Tracks you import will be copied there (if configured to do so) or will be copied there after an explicit library consolidation. I think the tracks will actually be hard-linked, not copied, to avoid wasting space on your storage device, but I’m not certain of that.

When you’re happy with the new library and/or new media folder, you can delete the old ones.

This doesn’t reset any of the app’s preferences and settings. But if you’re looking to start with a clean library, this is the way to do it.

I’ve done all that, multiple times on multiple versions of Mac OS & Music.app. That does NOT clear out all the cruft in ~/Library. You get a ‘clean library’ but you don’t get a “clean state’ of preferences, etc!

Between clearing out the items mentioned earlier in your ~/Library directory and creating a new music library, I think you are doing all that is needed to reset Music.app.

I presume that you have tried all of this while Music.app was not running and that you restarted your Mac (or at least logged out and logged back in again) before re-launching Music.app.

It sounds like your questions are not around your music library itself, but if they are, make sure that you have toggled iCloud Music Library syncing off (Music > Settings > General > Sync Library).

If you haven’t already done it, I definitely would go through the process of setting up Apple Music on a test user account on your Mac, i.e., creating a new local Mac user and then setting up a new Music account using your existing Apple ID. At a minimum, that would demonstrate if any unexpected behaviors are caused by Tahoe itself or by your previous user environment, i.e., the contents of ~/Library and ~/Music. Be sure to note exactly which behaviors are unexpected, as that may help with further troubleshooting.

Well, “this is not my first rodeo” when it comes to trying to narrow down bugs. I have created a separate test account, boy does Mac OS make it -hard- to remove all the Apple default cruft in a new account. One problem is that the music playing in the ‘test account’ stops when I go back to my normal user account.

I’ll do this on a Mini I use as a file server, where I don’t need to switch back and forth. Since a lot of my problems are related to AirPlay (either directly, or I suspect indirectly), that’s why ~/Library settings as opposed to the regular Music.app stuff is potentially significant.

And of course, there’s the confusion between “device” and “account on device.” It’s really annoying to get ‘a new device has been added’ when I just created a new account on an existing device, and to get that on every Apple product I own…

I may not have much to add except more confusion. OTOH when you take the bull by the horns it may not be clear which way is up, so who knows what may help.

I have tended to avoid Music ever since it was released. My main use of music on my Mac is playing webcast radio, or from my library. From all I read, Music did not work well with libraries, and it might replace my transcribed-from-CDs versions with its on-line versions. Waiting for years, Music’s reputation did not improve, so I backed up my media and tried converting to Music. From my subsequent experience, Music’s poor reputation is deserved. Point is, the rest of my comment does not start from a known well-functioning Music system.

(Lower case M) music in my house is played through Yamaha equipment, arranged in three Rooms controlled by Yamaha’s MusicCast application. Supposedly MusicCast can play my Media via Airplay, which is made available by Apple Music. Recently this has not worked well. Maybe I just did not spend enough time trying, or … who knows why?

I recently moved into a three story house which was wired with ethernet. I purchased a Ubiquity Dream router (UDR7) gateway and a few switches to run UniFi and manage the LAN, and began learning about VLANs and such advanced features. I am still learning and trying to get things right. One recommended advanced feature was to create a VLAN and WiFi on which Yamaha devices and MusicCast could be isolated. When it works it is great. Unfortunately, MusicCast has always been unstable, and I have only played webcast radio. Accessing my Media by Music / Airplay did not work (IIRC).

Ubiquiti tech support recommended turning off all advanced features, including a switch which implemented Level 3 routing, using only the UDR7 for routing. I did this a few days ago, and am not satisfied with all the results so far. Except, much to my surprise, now Airplay seems to work!

I do not have a “do this and everything will be fine” happy ending to the story. Like large random variations in data, Heisenbugs suggest you are not looking at all the relevant variables, so I am suggesting another place to control for trouble. I believe you are also working with Ubiquiti equipment. I suspect Level 3 routing, as implemented by some Ubiquiti switches, may have bugs. Ubiquiti equipment and software is very full-featured, but online discussions suggest much still appears to be beta quality. Ubiquiti is responsive and fixes known issues fairly rapidly, but simultaneously adds features possibly creating new issues.

Eliminating Level 3 routing by a switch seemed to let Airplay work for me, but other advice from Ubiquiti tech support seems to require adding back such routing. I am still trying to figure out the best way to set this up.

I suspect unknown issues in your UniFi System may be a source of your problems, as it seems to be for me.

Interesting thoughts… But I wouldn’t blame Unifi for instability in Music.app itself. That crashed on me today (On my ‘new test account’ I paired my iPhone remote app with the test account Music.app. Then I went to check the AirPlay targets and the app completely crashed and generated a crash report for Apple.)