How do I stop Apple Music from automatically opening on my Mac?

You press Play/Pause on your keyboard, squeeze the stem of your AirPods, or take your headphones out, and Apple Music opens. You don’t even use Apple Music. Spotify users in particular run into this all the time, and so does anyone who mostly listens in a browser.
You can’t uninstall Music, because it’s a built-in part of macOS. You can stop it hijacking your media controls, though.
Why it happens
macOS has a small background service called rcd (the Remote Control Daemon). Its job is to listen for media-control events (the Play/Pause key, AirPods squeezes, headphone buttons) and send them to whichever app is currently playing.
The catch is what happens when nothing is playing. Maybe you paused a YouTube tab and closed it, or Spotify isn’t running. In that case rcd falls back to its default, and the default is Apple Music. That’s why it only happens sometimes: if an app has recently claimed playback, it gets the button press, and if not, Music launches.
There are three ways to deal with it, from gentlest to most heavy-handed.
Option 1 (recommended): install Music Decoy
Music Decoy is a free, open source app that stops Apple Music launching when you press Play. Everything else carries on working: your media keys and AirPods still control Spotify, your browser, or whatever else is playing.
It works by sleight of hand. When nothing is playing, macOS looks for a running app that calls itself Music before it launches the real one. Music Decoy is a tiny app that does nothing at all except claim to be Music, so macOS sends the Play press to it and never opens the real Music app. It uses no processor time while it runs.
Installing Music Decoy
- Download it from the Music Decoy website.
- Open the download (double-click the zip file in your Downloads folder if your Mac hasn’t already unzipped it), then drag Music Decoy into your Applications folder.
- Open it from Applications. Nothing appears, not even an icon in the Dock or the menu bar. That’s normal: it’s running.
- Make it start automatically so it’s always running: open System Settings, search for Login Items, click + under Open at Login, and choose Music Decoy. (Apple moves this setting around from time to time. It’s usually under General, as Login Items & Extensions or just Login Items, but searching always finds it.)
That’s it. Press Play/Pause with nothing playing and… nothing happens. Which is exactly what you want.
If you use Homebrew, you can install it with brew install --cask music-decoy instead, and Homebrew will keep it up to date. New to Homebrew? Here’s my beginner’s guide.
Opening Music on purpose
While Music Decoy is running, the real Music app won’t open, even if you click it yourself. To use Music, quit Music Decoy first: open Activity Monitor, find Music Decoy, and click the ✕ button at the top of the window. Opening it again from Applications turns the protection back on. Its maker also offers a Shortcut that does both steps for you.
Bonus: open Spotify (or another app) instead
If you’d like the Play button to open your preferred music app instead of doing nothing, Music Decoy can launch it. Open Terminal and run this (for Spotify):
defaults write com.lowtechguys.MusicDecoy mediaAppPath /Applications/Spotify.app
To go back to opening nothing:
defaults delete com.lowtechguys.MusicDecoy mediaAppPath
Alternative: noTunes
noTunes does the same job a different way: it watches for Music starting and immediately closes it. It’s older and more widely used than Music Decoy, and it has one real advantage: an icon in the menu bar that turns it on and off with a click, handy if you sometimes do want Music. The trade-offs are that Music can flash up for a moment before noTunes closes it, and noTunes hasn’t been updated as recently.
Download it from its GitHub page (the zip file), or with Homebrew: brew install --cask notunes. Then open it and add it to Login Items in the same way.
![]()
The noTunes icon when it's on (left: Music can't open) and off (right). Images from the noTunes project (MIT).
noTunes can also open another app instead: defaults write digital.twisted.noTunes replacement /Applications/Spotify.app.
Option 2: disable rcd with Terminal
This is the fix you’ll find in most guides, and it still works for a lot of people. It turns off the Remote Control Daemon entirely:
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2>/dev/null
Be aware of the trade-off. This doesn’t just stop Music opening. It switches off the media-key service altogether, so depending on your version of macOS, your Play/Pause key and AirPods controls may stop working in every app, Spotify included. If you never control playback from your keyboard or headphones (on a Mac mini used for work, say), that might be fine. Otherwise, use Music Decoy.
Apple now considers load and unload legacy commands, and they may not work on every version of macOS. The modern equivalent is:
launchctl disable gui/$(id -u)/com.apple.rcd
launchctl kill SIGTERM gui/$(id -u)/com.apple.rcd
How to undo it
If you change your mind, or something stops working, re-enable it with:
launchctl load -w /System/Library/LaunchAgents/com.apple.rcd.plist
or, if you used the modern commands:
launchctl enable gui/$(id -u)/com.apple.rcd
launchctl kickstart gui/$(id -u)/com.apple.rcd
Option 3: an AirPods-specific tweak
If Music mostly opens when you take your AirPods out or put them back in, rather than when you press them, the cause is Automatic Ear Detection sending a pause/play signal. With your AirPods connected, open System Settings, click your AirPods’ name in the sidebar (or search for Ear Detection), and turn off Automatic Ear Detection. You’ll lose auto-pause when you remove an earbud, so only do this if it’s the main trigger.
Which should I use?
- Most people: Music Decoy. It stops Music launching and keeps your media keys and AirPods working everywhere else.
- You sometimes use Music and want a quick on/off switch: noTunes.
- You never use media keys at all: the Terminal command is a quick, no-install option, and it’s easy to undo.
- It only happens when you remove your AirPods: try turning off Automatic Ear Detection first.
If this helped, I’d love to hear about it, and if you’ve found another trick that works, let me know in the comments.
Enjoyed this? Support my work
GitHub Sponsors
Sponsor monthly with your GitHub account.
Sponsor on GitHubKo-fi
Donate once by card or PayPal.
Donate on Ko-fiComments
Other websites can respond by sending a Webmention.
Powered by Atmosphere Comments for Astro
