The correct way to disable Spotlight
A while back, I was looking for a way to remove the Spotlight icon from my menubar. I rarely if ever use menu icons, and wanted to reduce the clutter.
The only guides I was able to find recommended chmodding Spotlight.app to 000, to prevent it from being run. I did this, and was happy for a while, but this approach has a number of problems.
It’s unreliable. After OS updates or running repair permissions1, it’s back. But the main problem is more severe: launchd tries to relaunch it continuously. This is a much larger problem than it might seem. While I don’t think the system resources this consumes are significant, it does cause launchd to complain incessantly in your log files - every few seconds - which can eat up your disk space at an alarming rate.
I knew there had to be a better way, so I went looking. It turns out that launchd has normal .plist configuration files which tells it what services to launch. The relevant file for Spotlight is in /System/Library/LaunchAgents/com.apple.Spotlight.plist.
To completely disable Spotlight, this is what you need to do:
- In Finder, select Go ▸ Go To Folder (⌘⇧G)
- Enter /System/Library/LaunchAgents; click Go.
- Download my copy of com.apple.Spotlight.plist.
- Drag the file from wherever you downloaded it to the
/System/Library/LaunchAgentswindow. - Click “Authenticate” when prompted; enter your password; confirm that you want to replace the old file.
- Reboot.
Spotlight is gone for good, and I noticed a significant reduction in the time it takes to log in.
- Repair permissions is voodoo, and never fixes anything, but
people do it anyway.
