Apple MacOS Spotlight Problems & Fixes

Applications not coming up in spotlight? Corrupt spotlight database?

Try the following list of commands to solve most problems;

locate .metadata_never_index

sudo mdutil -i off /

sudo rm -rf /.Spotlight*

sudo rm -rf /.metadata_never_index

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

sudo /usr/libexec/locate.updatedb

sudo mdutil -i on /

sudo mdutil -E /

cache rebuild

sudo mdutil -pEsav