Disabling Spotlight

I feel sorry for the Apple developers who worked on Spotlight. I'm sure they put a lot of effort into it, and likely think it's a great feature. I suppose it must be disappointing that so many of us don't use it and don't want it even running. It can really bog down your machine when you are doing things like copying down a lot of files or moving things around; if you aren't going to use it anyway, why waste those cpu cycles and the disk space for the index?

Indeed. So let's get rid of it, shall we?


Hate these ads?


The first step is to become root. You can do everything with "sudo", but we have a few steps here, so it's easiest to start with "sudo su -". Give your ordinary password, and you have a root prompt.

To disable Spotlight from starting up at boot, edit /etc/hostconfig and change the Spotlight line:


 


 SPOTLIGHT=-NO-
 

For each disk drive, turn off Spotlight indexing:


 


 mdutil -i off /
 mdutil -i off /myotherdrive
 

Note that you'll see errors if the disk is very busy when you do that. Wait till the disk activity stops and try again.

Then run:







 


 mdutil -E /
 mdutil -E /myotherdrive
 

If there's any "mdimport" running in Activity Monitor or ps, kill it.

This gets rid of the index, but doesn't remove the .Spotlight directory, so:


 


  cd /
  rm -rf .Spotlight*
  cd /myotherdrive
  rm -rf .Spotlight*
 

Reboot after all this and you shouldn't be bothered by Spotlight again.

Some web sites have suggested using the System Preferences > Spotlight > Privacy tab but apparently that can cause other problems.


Technorati tags:

Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them.

I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.




Comments




Sun Jan 28 20:40:59 2007: Subject:   anonymous
Thank you!



That helped me ALLOT!



Sun Feb 4 05:34:17 2007: Subject:   anonymous
Spotless also does the same thing. It has a small shareware fee:



http://www.fixamacsoftware.com/software/spot/index.php



Wed Aug 22 22:57:29 2007: Subject:   anonymous
don't get me wrong, its a good feature for most cases, but it's great to have to way to disable it.






Tue Nov 20 22:24:41 2007: Subject:   TonyLawrence
On 10.5 Leopard, it's much. much better and I use it all the time:

gravatar
http://aplawrence.com/MacOSX/leopard_spotlight.htm






Tue Jun 3 14:49:17 2008: Subject:   Shaun


Thank you. Had to use sudo as I can't recall the root PW.



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments

If you want a picture to show with your comment, go get a Gravatar




Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here


book graphic unix and linux troubleshooting guide

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!





pavatar.jpg
More:
       - MacOSX












Change Congress