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.


Related articles:

Posted by: David Mendez in How to, Tips & Tricks


» Comments RSS Feed

  1. […] 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 […]

  2. Joe says:

    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?

  3. CyberMac says:

    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.

  4. xblubbx says:

    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?

  5. telephoner says:

    Or you can just use “sudo mdutil -i off” to turn indexing off.

  6. jack says:

    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)…

  7. ken says:

    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.

  8. […] 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 […]

  9. […] til hele harddisken under Privacy på kontrollpanelet for Spotlight, eller skru av indeksering med disse […]

  10. […] via Mac Tricks and Tips and OS X Daily […]

  11. Darren says:

    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.


  12. […] 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 […]

  13. Thomas says:

    Niiiiice. The mds process has always been a major pain. Thanks!

  14. […] 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 […]

  15. Vincent says:

    Then how do I bring it back?

    (Sorry my post is broken into 3 posts) :)

    • Paulo says:

      To bring back the spotlight icon:

      sudo chmod 777 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search

      Then restart menu… killall SystemUIServer


  16. Vincent says:

    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.

  17. Vincent says:

    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…


  18. Dd says:

    See polymorpheus’ post on this page for your answer as to why the “sudo mdutil” method is not the best t use:

  19. nate says:

    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?

  20. anthonyg says:

    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.

  21. anthonyg says:

    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.

  22. anthonyg says:

    Works to turn off Spotlight , but not to turn back on.

  23. RigoR says:

    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. :)

  24. machinehead says:


    How do I undo your script above?


  25. robertm says:

    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 –
    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

    (OSX reboots) ..
    and everything – and I mean *everything* runs at least 30% faster:
    – even Lightroom importing / rendering previews of 400 CR2 files..

  26. Richard McDonough says:

    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.

  27. Reddddddditor says:

    @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

    • Bry says:

      sudo mdutil -a -i on

      just worked for me – im running 10.6.8 snow leopard

    • BM says:

      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!

      • BM says:

        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

  28. Richard McDonough says:

    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!

  29. Diane Ross says:

    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

  30. CustomMac says:

    Will this kill the menu bar icon too? Hope so.

  31. mr flawless says:

    Any advantage of doing this if you have a modern decent spec mac?

Leave a Reply


Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks


iPhone / iPad



Shop on Amazon to help support this site