Disabling Spotlight in Sierra?

Discussion in 'Mac Basics and Help' started by Texas_Toast, Oct 4, 2017.

  1. DeltaMac macrumors G3

    DeltaMac

    Joined:
    Jul 30, 2003
    Location:
    Delaware
    #26
    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...)
     
  2. Texas_Toast thread starter macrumors 6502a

    Texas_Toast

    Joined:
    Feb 6, 2016
    Location:
    Texas
    #27
    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!)
     
  3. Fishrrman, Jan 24, 2018
    Last edited: Jan 24, 2018

    Fishrrman macrumors G5

    Fishrrman

    Joined:
    Feb 20, 2009
    #28
    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.
     
  4. Texas_Toast, Jan 24, 2018
    Last edited: Jan 24, 2018

    Texas_Toast thread starter macrumors 6502a

    Texas_Toast

    Joined:
    Feb 6, 2016
    Location:
    Texas
    #29
    In post #4 you said...

    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!
     
  5. MrAverigeUser macrumors 6502a

    MrAverigeUser

    Joined:
    May 20, 2015
    Location:
    europe
    #30
    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.
     
  6. Texas_Toast thread starter macrumors 6502a

    Texas_Toast

    Joined:
    Feb 6, 2016
    Location:
    Texas
    #31
    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.
     
  7. Mr_Brightside_@ macrumors 68030

    Mr_Brightside_@

    Joined:
    Sep 23, 2005
    Location:
    The 6ix
  8. Texas_Toast thread starter macrumors 6502a

    Texas_Toast

    Joined:
    Feb 6, 2016
    Location:
    Texas
    #33
    That was the easy one! ;)

    How about for the other two?
     
  9. Mr_Brightside_@ macrumors 68030

    Mr_Brightside_@

    Joined:
    Sep 23, 2005
    Location:
    The 6ix
    #34
    I don't know about the second, but the third probably isn't necessary to undo, as once spotlight is reenabled it will rebuild the index.
     
  10. DeltaMac macrumors G3

    DeltaMac

    Joined:
    Jul 30, 2003
    Location:
    Delaware
    #35
    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.
     
  11. Texas_Toast thread starter macrumors 6502a

    Texas_Toast

    Joined:
    Feb 6, 2016
    Location:
    Texas
    #36
    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.)
     
  12. DeltaMac macrumors G3

    DeltaMac

    Joined:
    Jul 30, 2003
    Location:
    Delaware
    #37
    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.
     
  13. Panbo macrumors newbie

    Joined:
    Jan 31, 2018
    #38
    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 ?
     
  14. Spying Spotify macrumors newbie

    Joined:
    Feb 22, 2018
    #39
    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
     
  15. Eric5h5 macrumors 68020

    Joined:
    Dec 9, 2004
    #40
    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
     
  16. boatrightsj macrumors newbie

    Joined:
    May 9, 2009
    #41

    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!!!
     
  17. Fishrrman macrumors G5

    Fishrrman

    Joined:
    Feb 20, 2009
    #42
    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.
     

Share This Page