
Warning: This is changing system settings that may or may not be attached to other tools. After an extensive search on the internet, one of these tools affected by the following steps is TimeMachine/TimeCapsule. If you are using them, I would not follow these steps. Rule of thumb: if you think it will mess up your system and you don’t want to worry about that, don’t do it.
Quick way
To disable:
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.metadata.mds.plist sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist launchctl unload /System/Library/LaunchAgents/com.apple.Spotlight.plist sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.Spotlight.plist
To re-enable:
sudo launchctl load /System/Library/LaunchDaemons/com.apple.metadata.mds.plist sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist launchctl load /System/Library/LaunchAgents/com.apple.Spotlight.plist sudo launchctl load -w /System/Library/LaunchAgents/com.apple.Spotlight.plist
Explaination
- Stop and disable the background server:
- Kill the Daemon:
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.metadata.mds.plist sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
- Re-enable the Daemon:
sudo launchctl load /System/Library/LaunchDaemons/com.apple.metadata.mds.plist sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
- Kill the Daemon:
- Stop and disable the spotlight application itself:
- Kill the Agent:
launchctl unload /System/Library/LaunchAgents/com.apple.Spotlight.plist sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.Spotlight.plist
- Re-enable the Agent:
launchctl load /System/Library/LaunchAgents/com.apple.Spotlight.plist sudo launchctl load -w /System/Library/LaunchAgents/com.apple.Spotlight.plist
- Kill the Agent:
You may get an error on the last command; just ignore it.
What it does
- We stop the process from running.
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
- The following line tells the system to fully disable it.
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
- Now we need to stop the agent for the user and everyone else.
launchctl unload /System/Library/LaunchAgents/com.apple.Spotlight.plist sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.Spotlight.plist
The re-enable Spotlight back again:
- If you need to re-enable the process, you can run the following two lines.
sudo launchctl load /System/Library/LaunchDaemons/com.apple.metadata.mds.plist sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
- The following two lines re-enable the Spotlight agent.
launchctl load /System/Library/LaunchAgents/com.apple.Spotlight.plist sudo launchctl load -w /System/Library/LaunchAgents/com.apple.Spotlight.plist
The reason you get the error is that you are effectively executing the command as root, but the root user hasn’t any running instance of Spotlight. On the other hand, only the root user is able to disable the automatic start of Spotlight. Thus the need for the sudo command.
Done!
There’s no need to reboot your computer after following these steps.












