Disable Spotlight in Mac OS X.

Spotlight may cause high RAM utilization, for this reason, in some cases, disable indexing can be very useful.

Disabling Spotlight (in this example the environment is Mac OsX 10.7 “Lion”) is pretty easy and can be done using Terminal commands.

Preferred Method:

The following command unloads the Spotlight mds agent from launchd, preventing the daemon from running or indexing any drives entirely.

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

The guaranteed 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.
Depending on the amount of changes and new files since the last time MDS ran, this can take a while.

Alternative Method:

To force Spotlight manager to disable all indexing on all volumes, type the following command:

sudo mdutil -a -i off

Re-enabling Spotlight is just as easy, just revert the command to:

sudo mdutil -a -i on

It is possible to verify that MDS is running through Activity Monitor or by pulling down the Spotlight menu to see an “Indexing Drive Name” progress bar.

Comments are closed.