Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
If your "Regular" user is a standard account, you can't run sudo commands in the terminal from a standard account.
You have to use an admin account or above.

(Pretty) sure that disabling Spotlight is system-wide (all users...)
 
  • Like
Reactions: jdogg836
If your "Regular" user is a standard account, you can't run sudo commands in the terminal from a standard account.
You have to use an admin account or above.

(Pretty) sure that disabling Spotlight is system-wide (all users...)

Yeah, from what I read online, I see that you have to be an Admin to run sudo.

The bigger question is, "Do all 3 commands that @Fishrrman provided above apply system-wide?"

The more I think about it, it seems like maybe I only had to run those as Admin and I'm done, but if someone could confirm that, it would be great.

(It would be nice if there was someone I could confirm this via Terminal to test my work and make sure that my mac is doing what I want it to do!)
 
I think you might have to disable SIP in order to disable Spotlight via terminal. I could be wrong.

I disable SIP as a matter of course on all of my OS installs.
I don't need or want it.
 
Last edited:
  • Like
Reactions: thewap
In post #4 you said...

Since it first appeared, I have disabled Spotlight on all my Macs.

Spotlight is easily turned off using the terminal:
sudo mdutil -a -i off

This command stops indexing of ALL volumes:
sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes"

This command removes the Spotlight index from main volume:
sudo rm -rf /.Spotlight-V100/*

Based on my research, these commands work.

And after looking at things last night, I believe they also apply to my Standard user.

The best way to test things out would be if you or someone could help me figure out how to reverse these commands...


For the first one, I assume you use...
Code:
sudo mdutil -a -i on

But I have no idea how to undo/reverse the 2nd and 3rd commands above!
 
Last edited by a moderator:
Thank you all
I was´t even aware at all that spotlight does search more than just locally on my Mac - and I did not know either that spotlight sends informations to apple....
Although I like the local search a lot I (hopefully) stopped the external "communication" by disabling internet search and transfer of data back to apple... thank you again.
 
Does anyone know the proper way to "undo" the following three commands related to disabling Spotlight?

Spotlight is easily turned off using the terminal:
Code:
sudo mdutil -a -i off

This command stops indexing of ALL volumes:
Code:
sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes"

This command removes the Spotlight index from main volume:
Code:
sudo rm -rf /.Spotlight-V100/*


By learning how to properly turn these commands on and off, that will help me to trouble-shoot whether these apply to all user accounts or if you have to run them on a per user basis.
 
I think you can take care of that second item, by simply going to the Spotlight pref pane (in System Preferences), then checking to see what exactly is listed in the Privacy tab. Deleting any and all items in that window should then allow any volume that your Mac can see.
 
  • Like
Reactions: Ambrosia7177
I think you can take care of that second item, by simply going to the Spotlight pref pane (in System Preferences), then checking to see what exactly is listed in the Privacy tab. Deleting any and all items in that window should then allow any volume that your Mac can see.

Good idea @DeltaMac

Sadly, because I am still having Trouble Logging In I guess another way to test this is when I reinstall Sierra.

Of course, learning some new command line would be even better

What about something like this...

Code:
sudo defaults delete /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes"


(I've seen something similar used before in other areas.)
 
I am pretty sure that you don't need to undo those 2 commands - and that the re-indexing command both resets the database, and sets the spotlight system to defaults.
Even so, if you check in the Spotlight pref pane/Privacy tab, that should show which volumes are set to be ignored by spotlight, which is really what that third terminal command does. Resetting the Spotlight system removes and restarts the database, and the third command in your list would be undone as a result of that reset, nothing more for you to do --- Spotlight simply starts up again. And, you can check while drives are mounted, in the Spotlight pref pane/privacy tab. That will list volumes that are currently ignored by Spotlight (if those volumes are mounted at the time).
Not really a big issue, unless you swap out external drives very frequently. Spotlight checks and updates the database when the drive mounts, unless you have set that drive to be ignored - and it will appear in that privacy tab.
If you want that drive be indexed by spotlight, then simply delete it from the privacy tab.
This is WAY easier to do, than reading my pitiful posts about the process.
 
Since it first appeared, I have disabled Spotlight on all my Macs.

I didn't want it running in the background, especially on the Mac I was using for recording live audio.

I find that without Spotlight, things just go faster. But perhaps that's just me.

Spotlight is easily turned off using the terminal:
sudo mdutil -a -i off

This command stops indexing of ALL volumes:
sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes"

This command removes the Spotlight index from main volume:
sudo rm -rf /.Spotlight-V100/*

The menu icon will still "be there", but after doing the above, Spotlight will no longer be lurking in the background.
Since it first appeared, I have disabled Spotlight on all my Macs.

I didn't want it running in the background, especially on the Mac I was using for recording live audio.

I find that without Spotlight, things just go faster. But perhaps that's just me.

Spotlight is easily turned off using the terminal:
sudo mdutil -a -i off

This command stops indexing of ALL volumes:
sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes"

This command removes the Spotlight index from main volume:
sudo rm -rf /.Spotlight-V100/*

The menu icon will still "be there", but after doing the above, Spotlight will no longer be lurking in the background.
Hi Fisherman
I performed all 3 commands and it worked......but I regret as I now can't search my mail boxes. I tried the first -sudo mdutil -a -i on - but the command was automatically reversed:
sudo mdutil -a -i on
/:
Indexing enabled.
/private/var/vm:
Indexing and searching disabled.

How do I reverse ?
 
Testing Spotify disable on MacBooc air, Sierra

Disabling for all volumes using the default does not work, when you insert a USB key it gets indexed
Disabling for / may or may not work, who knows ?

I would say that given HOW DIFFICULT it is to REMOVE spotify (you cannot) then ....

Yes, Apple is spying on you and you cannot do anything about it

So, the question is, how do I REMOVE
/System/Library/CoreServices/Spotlight.app/Contents/MacOS

Thanks
 
Are you trying to say "Spotlight"? Spotify is something quite different. And no, Apple is not spying on you, since they don't get any of the Spotlight data. It only exists on your computer. Any privacy concerns are addressed by disabling Spotlight Suggestions in the preferences. (Which really should be disabled by default.)

--Eric
 
Since it first appeared, I have disabled Spotlight on all my Macs.

I didn't want it running in the background, especially on the Mac I was using for recording live audio.

I find that without Spotlight, things just go faster. But perhaps that's just me.

Spotlight is easily turned off using the terminal:
sudo mdutil -a -i off

This command stops indexing of ALL volumes:
sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes"

This command removes the Spotlight index from main volume:
sudo rm -rf /.Spotlight-V100/*

The menu icon will still "be there", but after doing the above, Spotlight will no longer be lurking in the background.


I agree with you and and used the three terminal commands above to totally disable Spotlight Index. However; if for some reason in the future, I would like to undo the three commands above, How would I modify the commands to undo and stare Spotlight Indexing again??? Thanks so much for your help!!!
 
boat asked:
"How would I modify the commands to undo and stare Spotlight Indexing again???"

Perhaps...
sudo mdutil -a -i on

That's a guess. Once turned off, I see no reason why I'd want Spotlight on again, ever.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.