Mac Tip: Force Spotlight to Reindex
So, I’ve recently been having trouble launching apps from Spotlight in Mac OSX Mountain Lion, for example: previously hitting cmd+space and typing “iM” would be enough to highlight iMovie but recently, instead Spotlight would show all sorts of directories used by iMovie to store project data. Most annoying (especially since it was also affecting other apps like iPhoto, iTunes and many more!).
After doing some research I discovered the Terminal command below that forces spotlight to scrap it’s index and create a new one. Here’s what you do:
- Launch Terminal.app from /Applications/Utilities/
- When presented with the bash prompt, type “
sudo mdutil -E /” (without quotes)
- Enter your admin password (if prompted).
- You should see a little dot pulsating in the center of the spotlight icon.
- Sit back and wait while spotlight reindexes your entire computer (this can take a while so go and play a round of golf or something)
That’s all there is too it – launch an app, paste a command and voila! Spotlight should shortly be restored to it’s former glory.
(PS… this tip should also work in OSX Lion and OSX Leopard / Snow Leopard too!)