What to Do When Spotlight Stops Indexing Your Files

Sometimes, though, the Spotlight engine can stop indexing new files and emails. By the time you notice, it may have been weeks or even months since Spotlight updated its database. Luckily, there’s an easy way to get Spotlight’s engine back up and running.

Resetting the Spotlight Database

Most people don’t mess with Spotlight’s settings — and for good reason: it just works. But you can change which drives, folders, and types of files Spotlight indexes. When Spotlight stops indexing your hard drive (which is probably called “Macintosh HD”), make these changes in the Spotlight system preference to fix the problem:

  1. Open System Preferences and click on the Spotlight preference.
  2. Click on the Privacy tab.
  3. Now check to see if your hard drive is listed under “Prevent Spotlight from searching these locations.”
  4. If it is, click on your hard drive in the window and then press the minus button to remove it from the list. Quit System Preferences, and you’re done. Spotlight light should go back to indexing your drive (which could take some time).
    Spotlight search

    1. If the drive is not listed here, add it to the list, either by dragging the hard drive icon into the window or by pressing the plus button and adding your hard drive. Then quit System Preferences.
    2. Reopen System Preferences now, select Spotlight again, and again click on the Privacy tab. Now you want to remove the hard drive you just added to the privacy list (click on the hard drive in the list and press the minus button). Quit System Preferences, and Spotlight should begin reindexing your drive.

It may take some time before Spotlight begins indexing your drive (and even more time before it finishes). While Spotlight is indexing your drive, do not expect to get accurate search results! Wait until it finishes.

Use Terminal to Re-index Spotlight

If the above steps do not solve your Spotlight indexing problem, you can delete the entire Spotlight index and reindex your drives — if you’re willing to perform commands in the Terminal.

Warning! Performing commands in the Terminal as sudo can cause damage to the contents of your hard drive if typed incorrectly. Be careful.

Run the following commands in the Terminal:
sudo mdutil -i off /
sudo rm -rf /.Spotlight*
sudo mdutil -i on /
sudo mdutil -E /

If, however, you are using File Vault on your user account, the Spotlight index is stored in your user account, so you would run the following commands instead. Replace username with the name of your user account:
sudo mdutil -i off /
sudo rm -rf /Users/username/.Spotlight*
sudo mdutil -i on /
sudo mdutil -E /

These commands turn off Spotlight, remove the Spotlight index, turn Spotlight back on, and then ask Spotlight to immediately begin indexing your drives.