MacOS – Restore Spotlight Indexing

macosspotlight

I deleted existing Spotlight Indexing on my MacBook Pro running macOS Mojave by executing:

sudo rm -rfv /.Spotlight-V100

Now I don’t see anything – no apps, downloads, trash, nada. How do I undo this? I tried adding folders to Privacy tab in System Preferences > Spotlight, and then removing them, but it didn’t help.

Best Answer

It looks like you disabled Spotlight indexing via Terminal commands, then tried to restore the default behaviour via graphical user tools (System Preferences).

That may fail as some guides for the Terminal are really 'thorough'.

In the screenshot above you have the commands:

Prevent indexing:

sudo touch /Volumes/YourVolumeHere/.metadata_never_index

Disable indexing and searching:

sudo mdutil -i off -d  /Volumes/YourVolumeHere/

Delete existing index:

sudo rm -rfv /.Spotlight-V100

To reverse these steps

sudo rm -i /.metadata_never_index
sudo mdutil -i on /Volumes/YourVolumeHere/

To remove the file that tells Spotlight to 'never index here' and turn on again the indexing and search on the drive.

The Spotlight folder should be recreated as needed. It may take a while and a reboot won't hurt.