Disable Spotlight in Mac OS X 10.6 Snow Leopard
Sep 20, 2009 - 42 Comments
Disabling Spotlight in Snow Leopard is pretty easy, launch the Terminal and type the following command:
sudo mdutil -a -i off
This tells the Spotlight manager to disable all indexing on all volumes, the command will require your administrative password to execute.
Re-enabling Spotlight in Mac OS X 10.6 Snow Leopard is just as easy, just reverse the command to:
sudo mdutil -a -i on
Now Spotlight indexing will be back on and work as usual.
[…] approach is to use the older indexing method of “sudo mdutil -a -i off” which turns off indexing only, but more on that in a […]
I turned off spotlight, it said “Indexing disabled” but the mds and the mdworker processes are still running 90% of my CPUs. I tried killing them and they just keep starting up again. How can I turn the thing off?
I was wondering why none of the above Terminal commands would turn Spotlight back on, then I remembered I’d used ‘Cocktail’ utility to turn it off & no amount of commands would override that! lol, turned it on in that, then I could use the System Prefs of Spotlight to keep control of what I needed. You can use Cocktail to turn on or off each individual HD, which is very useful.
We use an external LDAP Server and want to disable indexing for all users.
Does sudo mdutil -a -i off disable indexing for all users on one machine or just for the current user?
Or you can just use “sudo mdutil -i off” to turn indexing off.
Thanks for the tip.
So much for the “user friendly” OS – no way to suppress a basic annoyance without getting your hands dirty with the command line. And what an annoyance it is – slowness, unable to eject a flash drive because of the indexing, the disk space wasted on the index (quite significant on a flash drive)…
after months of having Spotlight hung at indexing – and after trying the first commands suggested for Console here [which only turned off indexing of 1 out of 3 drives connected!] i’ve used Spotless to completely turn off Spotlight. And now Time Machine [which also was hung at ‘calculating changes’ – and NEVER worked – on my brand new iMac 29″ i7] now works as it should. Thanks to Vincent & Darren. a brilliant and simple little app. Does what it says on the label.
[…] sistem si aplicatii + Optibay de la MCEtech pentru HDD-ul mare. 3. Daca nu folosesti Spotlight, dezactiveaza-l. Daca il folosesti, pune cat mai mult in Privacy (System Prefs – Spotlight – tab Privacy) pentru a […]
[…] til hele harddisken under Privacy på kontrollpanelet for Spotlight, eller skru av indeksering med disse […]
[…] via Mac Tricks and Tips and OS X Daily […]
people! people! use Spotless, it’s shareware and turns off spotlight for you (as well as some other nice options, including turning off just the indexing, or deleting the indexes altogether)
just turned off indexing and spotlight, and the everpresent beachball of death is no longer. happy mac user again.
http://www.fixamacsoftware.com/software/spot3/index.php
[…] Re-enabling Spotlight in Mac OS X 10.6 Snow Leopard is just as easy, just reverse the command to: sudo mdutil -a -i on Now Spotlight indexing will be back on and work as usual. osxdaily […]
Niiiiice. The mds process has always been a major pain. Thanks!
[…] again. If you don’t ever use the search feature or just don’t like it, you can also disable Spotlight and all of its […]
Then how do I bring it back?
(Sorry my post is broken into 3 posts) :)
To bring back the spotlight icon:
sudo chmod 777 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search
Then restart menu… killall SystemUIServer
;)
To remove the menu bar icon, run this Terminal command:
sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search
You’ll then to restart the menu bar with killall SystemUIServer to see the icon vanish.
I used Spotless to kill Spotlight.
How do I get rid of the spotlight icon in the menu bar and then get it back if I decide to let the beast run on my computer again?
I found this command to get rid of the SpotLight menu bar icon, but would like to know how to bring it back before I try it…
<>
See polymorpheus’ post on this page for your answer as to why the “sudo mdutil” method is not the best t use:
http://forums.macosxhints.com/showthread.php?t=105067
When using the command “sudo mdutil -a -i off” it turns of indexing on all drives except my backup drive (the one linked to Time Machine) – any ideas why?
Found a way to fix this; try the following commands for unloading and reloading the spotlight server engine:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
if you get an error on the unload just do the load line as the service may already be off.
Thanks. A year later, that really worked for me.
Man,
you are god. spotlight was dead. so many things didnt work. Then i tried this and it worked like a charm.
thanks a tonne.
regards
ashok
DUUUUDE, BLESS YOU one million zillion times. you are the MASTAH. I have searched for this solution for days and days. THANK YOU BROTHERMAN. you rock. seriously
Totally worked for me. You da man!
Has anyone come up with a way to undo this; when I type the command that is suppose to turn “Spotlight” back on (mdutil -a -i on) as root I get “Spotlight server is disabled” as a result.
Works to turn off Spotlight , but not to turn back on.
Mr. Flawless,
if you have a Dual G4 with 4GB taking care of 60TB of files it can save you from having to go to the datacenter and poweroff the box because it’s hung trying to index all that storage. :)
robertm,
How do I undo your script above?
Thanks.
for mr flawless, who commented:
“Any advantage of doing this if you have a modern decent spec mac?”
Well, *if it’s done right* – like this:
orion:~ robertm$ sudo su –
Password:
orion:~ root# cd /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Support/
tar -cvf mdworkstuff.tar ./
(saves all md* to a tarball in case you ever want it back)
then :
rm mdworker
rm mdworker32
rm mds
rm mdwrite
sync;sync;reboot
(OSX reboots) ..
and everything – and I mean *everything* runs at least 30% faster:
– even Lightroom importing / rendering previews of 400 CR2 files..
Geting the mac to reindex using several methods, including those here and a day’s worth of calls to apple, did not work. In the end a shareware worth more than the seventeen bucks I paid for the relief of the lack of spotlight agony, called spotless 3.x worked like a dream. My find and spotlight both work and the glitch that was unglitchable by other means is fixed and the machine is working much faster. Why that last result beats me, but I am not questioning.
@Diane Ross
You are entering the command wrong, it’s
sudo mdutil -a -i on
you are entering ‘sudo mdutil -a -i o’ and mdutil is not recognizing ‘o’ as an option and it’s throwing an error
anyway the above commands worked fine for me but I like Spotlight so I will keep it, thanks
sudo mdutil -a -i on
just worked for me – im running 10.6.8 snow leopard
Perhaps this was caused by a “duh” moment, like mine:
Before running the cls instructions listed above, I tried using the System Pref for Spotlight, putting the whole drive in the Privacy tab so that it would not be indexed. I forgot to remove this, then ran the ‘sudo mdutil -i off /’, which, btw, worked. I then went to re-enable this and could not! Using the ‘Spotless’ utility, I also couldn’t enable Spotlight, but there was a message displayed that led me to looking at the System Pref for Spotlight, removing the boot drive from the Privacy tab. Once I did this, ‘sudo mdutil -i on /’ worked again!
Also, running ‘sudo mdutil -i off /’ *should* remove all files and directories under /.Spotlight-V100, which is where all of the indexing files/folders are stored. Further, you’ll need to use sudo to get a listing of what is below this directory, e.g.:
sudo ls -laR /.Spotlight-V100
Spotlight commands do not work for me. Always disabled and everything I have done to enable spotlight has not worked. Including reinstalls of the Snow Leopard that must have had a Microsoft employee sabotaging it!
I turned it off, but it won’t turn back on.
sudo mdutil -a -i o
Error: unexpected indexing state (o)
When I run sudo mdutil -E /, I get Indexing disabled.
Also tried this:
sudo rm –R/.Spotlight-V100/
rm: –R/.Spotlight-V100/: No such file or directory
Leave a space between the -R and /.Spotlight-V100
It’s not -o, it’s -on
[…] Source: OSX Daily […]
Will this kill the menu bar icon too? Hope so.
Any advantage of doing this if you have a modern decent spec mac?