Don’t open anything

noTunes is a macOS application that will prevent iTunes or Apple Music from launching.

Simply launch the noTunes app and iTunes/Music will no longer be able to launch. For example, when bluetooth headphones reconnect.

tombonez/noTunes: A simple macOS application that will prevent iTunes or Apple Music from launching.

Open something else

Set replacement for iTunes / Apple Music

Replace YOUR_MUSIC_APP with the name of your music app in the following command.

defaults write digital.twisted.noTunes replacement /Applications/YOUR_MUSIC_APP.app

Then /Applications/YOUR_MUSIC_APP.app will launch when iTunes/Music attempts to launch.

This can be used to open a website too, for example, YouTube Music.

defaults write digital.twisted.noTunes replacement https://music.youtube.com/

The following command will disable the replacement.

defaults delete digital.twisted.noTunes replacement