Completely Disable Spotlight in Leopard 10.5
When you don't use Spotlight, it's better to disable it completely.
The MDS process takes up much CPU resources and it isn't also very memory friendly.
This How-To is written for Mac OS Leopard 10.5, and should not be applied to systems running Tiger.
If only some of your accounts need/want to have Spotlight enabled, you can copy the /System/Library/LaunchAgents/com.apple.Spotlight.plist to the users own ~/Library/LaunchAgents folder and enable/start Spotligth:
The MDS process takes up much CPU resources and it isn't also very memory friendly.
This How-To is written for Mac OS Leopard 10.5, and should not be applied to systems running Tiger.
-
Start Terminal and enter the following commands:
- Stop and disable the spotlight application itself:
#cd /System/Library/LaunchAgents
#launchctl unload com.apple.Spotlight.plist(stops the application for the current user)
sudo launchctl unload -w com.apple.Spotlight.plist(disables for every user)
Just ignore the errormessage from the last command.
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. - Stop and disable the background server:
#cd /System/Library/LaunchDaemons
#sudo launchctl unload -w com.apple.metadata.mds.plist - Remove the .Spotlight-V100 directories
sudo find / -iname '.Spotlight-V100' -type d -maxdepth 3 -print0
| xargs -0 -t -n1 sudo rm -rf
The find part searches for the Spotlight directories and will find the one at the system root as well as on any partitions and attached drives in /Volumes. The -print0 part is there to guard against any spaces and other special characters in filenames when executing the following rm command. The .Spotlight-V100 folders are actually empty. Stopping the mds server does this, so if you aren't bothered by these vestiges of the process, you can ignore this step.
If only some of your accounts need/want to have Spotlight enabled, you can copy the /System/Library/LaunchAgents/com.apple.Spotlight.plist to the users own ~/Library/LaunchAgents folder and enable/start Spotligth:
cp /System/Library/LaunchAgents/com.apple.Spotlight.plist ~/Library/LaunchAgents/
launchctl -w ~/Library/LaunchAgents/com.apple.Spotlight.plist