The Spotlight feature in MacOS Sierra allows you to search the items on your PC as well as the web. You can enable or disable Spotlight using these steps.
Option 1 – Selectively Choose Indexed Items
- From the Finder, select the Apple Menu then choose “System Preferences…“.
- Select “Spotlight“, located in the top row.
- Check the items you wish to allow Spotlight to index. Uncheck the items you don’t want Spotlight to index.
Option 2 – Completely Disable Spotlight Indexing
Note: You may have to disable System Integrity Protection to perform these steps.
- From the finder, select “Go” > “Utilities” > “Terminal“.
- Type one of the following commands, then press “Enter“:
- Enable Indexing –
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
- Disable Indexing –
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
- Enable Indexing –
EdPeMa says
J says
October 12, 2018 at 1:34 pm
“Deleted the hidden file .metadata_never_index in the root directory and then was able to turn spotlight on again with mdutil -i on /.’
This did the trick
William says
As soon as you reboot or turn on a Mac launch demons will kick in and fire up metadata indexing no matter what, unless you unload and delete these files, at which point I’m not sure macOS won’t recreate them.
I still need to suppress Spotlight indexing after reboots or simple boots because it literally kills the system causing it to become frozen. I want it just to be able to find existing items. I want to run indexing manually in Terminal as I see fit.
One recommendation was to create a special hidden file “.metadata_never_index_unless_rootfs” at the root of the file system (“/” folder), however it doesn’t turn off Spotlight mdworkers.
Another solution based on the article is to create a demon at “/System/LaunchDemons/” and tell him to execute either the author’s defaults command or the dedicated CLI command (that is, “mdutil”).
A says
no it didn’t help me. I’m looking for a way to turn off indexing for all external drives only. So the system never indexes any plugged in USB drive, Disk image, or external HD. A method that doesn’t require me to add each drive individually. Not sure if it’s even possible.
Jeff Fisher says
Anyone know how to stop MDS? i’ve stoped indexing but it’s still cranking away
Gerda Halvorsen says
If anyone is still hanging around on this thread, I have a question.
I recently migrated my my applications and data to a new Mac, both running Sierra. For particular reasons I still use Entourage 2008, although I otherwise use the MS Office 2019 programs. Upon finishing the migration, my Entourage functions normally apart from it is no longer possible to use the search function. Nothing shows up.
I have tried database rebuilds, import into a new identity, reinstallation of Entourage (which turned out to be impossible from my original disks in Sierra). The identity works fine and searches when acessed over a local network on a machine running Snow Leopard. I am at wit’s end and an about to give up and just rely on the spotlight searches (which aren’t very convenient for Entourage mails). If anyone has a brilliant idea I would love to hear it…
Jz says
sudo mdutil -a -i off
run this cli to disable Spotlight
Uhane says
If anyone is still reading this thread… I too cannot activate the reindexing and receive the integrity message.. There is no .metadata_never_index that I can see in the root with hidden folders enabled… Where is this file??? when you go to this “root” should it be at the top level?? where is this file exactly? Might someone provide a file tree for me? some breadcrumbs?? of course I cannot do a search for it … because well .. s’why I’m here.. I have tried all the solutions available…
Ohne says
Thanks J.
Your trick did it for me!
Alexander Ewering says
“Operation not permitted while System Integrity Protection is engaged”.
Maritn Turner says
Being as I only want Spotlight on my Mac Pro SSD (but not all my external drives) I just set all but the Mac SSD off via System Preferences > Spotlight > Privacy and add the name of each volume you don’t want Spotlight to index. Your system will be heaps quieter and your disks actually able to sleep!
Stephen Wick says
What do I do if I execute your ‘sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist’ command and it says, “/System/Library/LaunchDaemons/com.apple.metadata.mds.plist: Operation not permitted while System Integrity Protection is engaged”?
J says
Hi,
I had a similiar error I was unable to fix with the above and resolved it following these instructions posted by someone else:
“Deleted the hidden file .metadata_never_index in the root directory and then was able to turn spotlight on again with mdutil -i on /.’
Spotlight is reindexing my hard drive now, yay!
I wonder how was this file originally created. Anyone?
chase says
if i disable the integrity protection so i can disable indexing then after indexing is disabled can i enable the other protection again and have indexing stay disabled or will it enable it automatically ?
Mitch Bartlett says
Yes
MazterGee says
Will indexing stay disabled even after reboot?