How do I disable Spotlight?
How can I disable Spotlight completely on Mac OS X Lion?
It's using up a lot of resources and I never really use it, so I want to disable it.
The only feature I might want to keep is the icon in the status bar which lets me launch applications. The main feature I want to disable is the indexing every single file on my hard drive. I never use Spotlight to access files, I only use it to launch applications.
Are there any risks in disabling it? Is there an Apple recommended way to disabling it?
How would I re-enable it later on if I want to?
Solution 1:
To disable, open Terminal and run
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
This disables the Launch Daemon that starts and keeps it running. You can also run:
sudo mdutil -a -i off
but from looking online in a few places, this may give you an error like 'Spotlight server is disabled'
If you disable though, it will continue to use an old cache, or not work at all. Therefore, the launching applications as you mention will no longer work. It also may break other functions related to the OS, like the Mac App Store (to know whats installed, etc), and LaunchPad.
If you still need an application launcher, you can use applications like LaunchBar and Quicksilver.
After seeing your update (espc. on how to stop it indexing so much), there are two things to check:
- Are you running something like a virus scanner or other application constantly accessing files on your drive? This will force spotlight to keep indexing. A network share would also be a culprit.
- You can also filter what folders Spotlight should index, and by configuring this, can limit how much has to be indexed. Do do this, go to System Preferences -> Spotlight -> Privacy.
Re-enabling would be running
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
or
sudo mdutil -a -i on
Solution 2:
In addition to @jmlumpkin's Terminal command, you could simply add your entire hard drive to the Privacy tab in Spotlight preferences. You'd also want to add any external hard drives you regularly plug in.
The same caveat applies: you wouldn't be able to use it as an application launcher, so you'd need to get something like Quicksilver or LaunchBar.
To re-enable, just remove the relevant entries from the list in the Privacy tab.