Future proof solution to prevent Apple Music from auto launching on your Mac (No Extra Apps Needed)
If you’ve ever connected your Bluetooth headphones or tapped a media key on your Mac, only for Apple Music to burst open uninvited and start playing something embarrassing in front of coworkers, you’re not alone.
Apple Music has a reputation for launching itself at the worst possible moments—and Apple keeps changing how it behaves, making it difficult to disable through traditional settings. Most solutions floating around are outdated, no longer work, or require third-party tools that some folks just don’t want to install.
Below is a future proof, lightweight way to automatically and instantly close Apple Music the moment it tries to open, without installing any 3rd party app or need for sudo or elevated permissions.
And it works for any scenario that Apple Music tries to launch itself, whether it’s your Bluetooth headphones or TouchBar or some weird random keystrokes.
Step-by-Step Guide to Automatically Kill Apple Music
1. Create a Shell Script to Kill Apple Music
Open Terminal and create the script:
nano ~/kill_music.sh
Paste this content:
#!/bin/bash
while true; do
if pgrep -x "Music" > /dev/null; then
killall Music
fi
sleep 0.5 # Check every 0.5 seconds
done
Save and exit the file (Ctrl + X
, Y
, Enter
).
Make the script executable:
chmod +x ~/kill_music.sh
2. Create a Launch Agent
This will ensure the script runs automatically in the background every time you log in.
Create the Launch Agent file:
nano ~/Library/LaunchAgents/com.user.kill_music.plist
Paste the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.user.kill_music</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Users/baonguyen/kill_music.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
baonguyen
is my username. Make sure to replace baonguyen
with your actual username.
3. Load the Launch Agent
To activate the script:
launchctl load ~/Library/LaunchAgents/com.user.kill_music.plist
Check if it’s running:
launchctl list | grep kill_music
4. Test and Confirm
Try launching the Music app manually. It should immediately close within half a second.
5. Modify the Script Later (If Needed)
If you ever update kill_music.sh
, reload the agent:
launchctl unload ~/Library/LaunchAgents/com.user.kill_music.plist
launchctl load ~/Library/LaunchAgents/com.user.kill_music.plist
6. Allow Apple Music to run again
If you no longer want to run the script (e.g, somehow you suddenly love Apple Music):
launchctl unload ~/Library/LaunchAgents/com.user.kill_music.plist
Why This Works
-
Auto-launches at login
-
Kills Music instantly upon launch
-
No need for sudo or elevated permissions
-
Lightweight and runs quietly in the background. Set and forget about it.
-
No third-party tools required
Final Thoughts
This isn’t some clever system hack—it’s just a simple script doing one job really well. Until Apple gives users better control over how and when Music launches, this method gives you peace of mind without needing to install anything or tinker with system integrity.
Stay focused, stay in control—and may your headphones never betray you again.