Apple - Spotlight "Indexing and searching disabled." message in terminal on OSX. Why?

FINALLY!! I got it working again!

Heres what I did:

In terminal I ran:

locate .metadata_never_index

No database existed, so it prompted me to run:

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

It ran for a few seconds and I retried the locate command.. it found it in my root. I deleted it and tried turning on spotlight again, but still got the "indexing and searching disabled."

I checked the permissions of my SSD and my account wasn't even listed. I added myself to read/write. Then ran:

sudo mdutil -i on /

terminal returned "Indexing enabled."

Lastly.. I went to system preferences>spotlight>privacy.. dragged my SSD then removed it to reindex. 40 minutes later.. everything is back to normal! It had been a year since spotlight worked on my MBP. Ohhh the struggles I faced trying to find emails/files.

Thanks for the tips and suggestions everyone and Google!


Re-index an entire drive In the Terminal, type sudo mdutil -E / and hit return. You may have to enter your password. The existing Spotlight index will be deleted, and Spotlight will start creating a new index in the background. You can re-index other hard drives by changing the command to include their name, like sudo mdutil -E /Volumes/OtherHardDrive.

sudo mdutil -i off /
sudo rm -rf /.Spotlight*
sudo mdutil -i on /
sudo mdutil -E /

I'm order, these accomplish:

  1. turn indexing off
  2. delete Spotlight folder
  3. turn indexing on
  4. rebuild

I search for it in the net for months... and it was so easy!!

System preferences -spotilight -Privacy -if your harddisk is in the list mark it and then press (-)

When your harddisk is removed from "prevent searching this locations", you spotilight will scan your files for around 2 hours and voila!

:)