APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Disabling Spotlight


Some material is very old and may be incorrect today

© December 2005 Tony Lawrence

Note - in more recent versions, I think Spotlight is great - and would NOT suggest disabling it.

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?

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.


If you found something useful today, please consider a small donation.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> Disabling Spotlight

7 comments


Inexpensive and informative Apple related e-books:

iOS 8: A Take Control Crash Course

Take Control of Apple Mail, Third Edition

Take control of Apple TV, Second Edition

Photos: A Take Control Crash Course

Take Control of Automating Your Mac





More Articles by © Tony Lawrence







Sun Jan 28 20:40:59 2007: 2838   anonymous


Thank you!

That helped me ALLOT!



Sun Feb 4 05:34:17 2007: 2849   anonymous


Spotless also does the same thing. It has a small shareware fee:

(link)



Wed Aug 22 22:57:29 2007: 3081   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: 3264   TonyLawrence

gravatar
On 10.5 Leopard, it's much. much better and I use it all the time:
(link)






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


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







Wed Mar 31 21:18:53 2010: 8322   nachopro

gravatar


Hello, thanks for your article... but in 10.6 (Snow Leopard) the SPOTLIGHT=-NO- entry in /etc/hostconfig has no effect :(

I can't remove spotlight from menu bar and if I make a search, mds process consume all procesor (when index is disabled)

Is good idea disable mds ? Can affect another applications, like safari history or other ?

thanks



Wed Mar 31 21:22:07 2010: 8323   TonyLawrence

gravatar


I can't imagine why you would want to disable it in 10.6 but I suppose you must have some reason. For me, it's now a great feature with no downside.

I have no idea how, sorry -

------------------------


Printer Friendly Version

Have you tried Searching this site?

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.

Contact us


Printer Friendly Version





Simplicity is prerequisite for reliability. ((Edsger W. Dijkstra)




Linux posts

Troubleshooting posts


This post tagged:



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode