Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

How can I disable Spotlight completely on Mac OS X Lion?

It's using up a lot of resources and I never really use it, so I want to disable it.

The only feature I might want to keep is the icon in the status bar which lets me launch applications. The main feature I want to disable is the indexing every single file on my hard drive. I never use Spotlight to access files, I only use it to launch applications.

Are there any risks in disabling it? Is there an Apple recommended way to disabling it?

How would I re-enable it later on if I want to?

share|improve this question
    
No offence meant, but this is almost the same as asking "I consider Mac OS X's right lung to be a waste of resources, how do I remove it safely?" You're better off not doing this. :) –  Steven Fisher Mar 28 '12 at 23:44
1  
@Steven: Except that I never use Spotlight, so why do I need it using up resources? –  Senseful Mar 28 '12 at 23:48
2  
Even if you don't use Spotlight directly, an ever-growing list of Mac OS X components use it. Things like Mac App Store, Time Machine, Mail. Even if you aren't using it indirectly right now, you will be in the future. And the resource cost just is not that high: it uses about 5% of your hard drive, I believe, and indexes cleverly to avoid causing problems. If you turn it off, you'll probably find surprising things won't work in subtle ways, and you won't really gain anything from it. –  Steven Fisher Mar 29 '12 at 0:11
    
@StevenFisher: Ahh I see... I wasn't aware that those apps use Spotlight behind the scenes. Thanks for the info! –  Senseful Mar 29 '12 at 19:49
    
If Spotlight is OS X's "right lung" then OS X must be a heavy smoker. Spotlight is often useless, it can't find files when I search for the exact filename! –  Josh Dec 22 '12 at 15:21
add comment

3 Answers 3

To disable, open Terminal and run

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

This disables the Launch Daemon that starts and keeps it running. You can also run:

sudo mdutil -a -i off

but from looking online in a few places, this may give you an error like 'Spotlight server is disabled'

If you disable though, it will continue to use an old cache, or not work at all. Therefore, the launching applications as you mention will no longer work. It also may break other functions related to the OS, like the Mac App Store (to know whats installed, etc), and LaunchPad.

If you still need an application launcher, you can use applications like LaunchBar and Quicksilver.

After seeing your update (espc. on how to stop it indexing so much), there are two things to check:

  • Are you running something like a virus scanner or other application constantly accessing files on your drive? This will force spotlight to keep indexing. A network share would also be a culprit.
  • You can also filter what folders Spotlight should index, and by configuring this, can limit how much has to be indexed. Do do this, go to System Preferences -> Spotlight -> Privacy.

enter image description here

Re-enabling would be running

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

or

sudo mdutil -a -i on
share|improve this answer
    
Sorry, I added a few more related things I was wondering about –  Senseful Mar 28 '12 at 23:33
    
And before I saw that, I had already added updates on what it may break in Lion. Will update answer again for restricting. –  jmlumpkin Mar 28 '12 at 23:37
    
Great answer! I'm accepting @CajunLuke's, though, since I'm afraid I might end up ruining something in Lion! –  Senseful Mar 28 '12 at 23:46
1  
Yes, but I am confused. You asked about 'disabling it completely', which I took as stop the service, versus the accepted answer that notes just to block it all. There would be a difference. And I understand not wanting to break something, but both are very easily reversible, and when it starts back up, it reindexes for you. the mdutil command is very handy. It also does not cover the 'risks in disabling'. –  jmlumpkin Mar 28 '12 at 23:48
    
You're right, I did phrase it that way, but I was hoping there was an Apple-approved method to disable it completely without the potential of messing anything up. Since there doesn't seem to be one, I prefer using the Privacy feature. The mdutil command seems like it can permanently disable Spotlight. My main concern is forgetting that I used this command, and then not reenabling it before installing an update which needs it enabled, and then ending up with an even bigger problem. –  Senseful Mar 28 '12 at 23:53
show 1 more comment

In addition to @jmlumpkin's Terminal command, you could simply add your entire hard drive to the Privacy tab in Spotlight preferences. You'd also want to add any external hard drives you regularly plug in.

The same caveat applies: you wouldn't be able to use it as an application launcher, so you'd need to get something like Quicksilver or LaunchBar.

To re-enable, just remove the relevant entries from the list in the Privacy tab.

share|improve this answer
    
Nice answer! This is great since it's the recommended way to do it by Apple (i.e. since they provided the privacy feature), and it seems like I should be able to add all folders except for the Applications folder. –  Senseful Mar 28 '12 at 23:44
    
@Senseful Don't forget that there are hidden directories at the root of the boot disk. Those might be tricky to add. –  CajunLuke Mar 28 '12 at 23:50
    
It may be as simple as it is to add them in Time Machine. Just drag the /System folder. –  jmlumpkin Mar 28 '12 at 23:52
    
@jmlumpkin I was thinking of /etc, /private, /usr, /.Trashes and the like. –  CajunLuke Mar 28 '12 at 23:54
1  
@jmlumpkin It actually says "Would you like to also exclude other files installed with Mac OS X, such as system applications and UNIX tools?" –  CajunLuke Mar 29 '12 at 0:31
show 3 more comments

In system preferences, under the "Spotlight" icon and "Search Results" tab, you can deselect all categories except for Applications.

share|improve this answer
1  
This would still index the locations. –  jmlumpkin Mar 28 '12 at 23:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.