Disable Spotlight In Mac OS X Lion [How To]






You can disable and re-enable Spotlight in Mac OS X Lion with the help of Terminal. The following command unloads the Spotlight mds agent from launchd, preventing the daemon from running or indexing any drives entirely.Open up the Terminal (found in /Applications/Utilities/) and enter the following commands based on the need to either disable or re-enable Spotlight indexing. This will effect indexing on all drives connected to the Mac.

Disable Spotlight

The primary method is using launchctl, this will require the administrative password:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Re-enable Spotlight

The assure way to reenable Spotlight is to reload it into launchd using launchctl:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

With Spotlight reloaded launchd, the mds agent will immediately start running again to reindex the filesystem. This may take some time depending on the amount of changes and new files since the last time MDS ran. You can verify that MDS is running through Activity Monitor or by pulling down the Spotlight menu to see an “Indexing Drive Name” progress bar.

[via - OSXDaily]