Spotlight loses index of Applications

When I get warnings that my HD is nearly full (Macbook Air, 64GB SSD), spotlight always loses its index of applications. That means that I can't launch Safari or Mail or other apps, which is the only thing I use Spotlight for. Only restarting helps to resolve this.

Is there a way to force Spotlight to reindex the Application folder?


Solution 1:

This happens whenever I erase the free space on my hard drive (probably for the same reason -- that process creates a big file that eats up all the free space, then overwrites it, creating a low space condition in the process). Typing this command at the terminal:

sudo mdutil -i on /Volumes/Hard_Disk_Name_Goes_Here

will rebuild your index. Substitute your own disk's volume name in the obvious place.

Solution 2:

Another alternative is to just have Spotlight delete it's index which will cause it to create a new one:

sudo mdutil -E /

If that fails to work, toggling Spotlight on the drive in question will work:

sudo mdutil -i off /
sudo mdutil -i on /

Change / to the path to the external hard drive if appropriate.

Solution 3:

You could drag your application folder to the “Privacy” tab and a few moments later remove it, that ought to cause a reindexing. Maybe unchecking it and re-checking “Applications” also does the same, but I’m not sure about the later.

If any attempt to do that fails, you might want to create a fresh index following these instructions. That usually clears any spotlight problems.

Also, running so low in disk space is never a good idea, try to make some room for the sake of your OS stability. That is also the reason why restarting fixes it, because when you restart, temp stuff gets deleted and there’s more “room” to play with in your HDD. As you start using your drive, the free space is less, and services start to fail.