Mac Spotlight and re-index

Mac Spotlight and re-index

Spotlight which is a tool to search a lot of things on our computer and the Internet, and I use it frequently to open applications is useful but it has a price (index content require use your computer resources) if you have enabled all the options and by default are enabled, my suggestion is select only the options that you want in the System preferences to reduce the resources usage.


I had a problem with Spotlight, it doesn't show some applications that I usually use, to solve this problem I followed these steps to reindex all my application and options I chose to index in the system preferences:

1. Disable Spotlight

The following commands require administration permissions:

sudo mdutil -a -i off

2. Unload Spotlight

sudo launchctl unload -w /System/Library/LaunchDaemons/

3. Delete the Spotlight folder

The spotlight folder contains files with the information about the files indexed.

sudo /bin/rm -rf /.Spotlight-V100/

4. Load Spotlight

sudo launchctl load -w /System/Library/LaunchDaemons/

5. Enable Spotlight

sudo mdutil -a -i on

After that Spotlight will reindex all the files and you will able to see the apps.

Is still not working?

If after all the step still not working you need to follow these extra steps:

After the step number 3 in the previous instructions:

4. Create a file to stop Spotlight index

sudo touch /.metadata-never-index

5. Restart your computer

6. Delete the file created in step 4

sudo /bin/rm -rf /.metadata-never-index

7. Load Spotlight

sudo launchctl load -w /System/Library/LaunchDaemons/

8. Enable Spotlight

sudo mdutil -a -i on