When Spotlight Stops Working
Spotlight is the central nervous system of macOS. Triggered by pressing Command + Space, it is designed to instantly find files, launch applications, calculate currency conversions, and search through your emails.
However, Spotlight relies entirely on a massive, hidden database called an "index" that constantly maps the location of every single file on your hard drive. If this index becomes corrupted—which frequently happens after a major macOS update, a sudden power failure, or a large data migration—Spotlight will break.
When the index is corrupted, Spotlight might fail to find files you know exist, it might take 30 seconds to return a simple result, or it might just display a blank white box. To fix these issues, you need to force macOS to delete its old database and rebuild the Spotlight index from scratch.
Method 1: Using System Settings (The Easy Way)
The safest and most user-friendly way to rebuild the Spotlight index is by using a clever workaround built into the macOS System Settings. By telling Spotlight to ignore your hard drive, and then immediately telling it to monitor it again, you force the system to trigger a complete re-index.
Note: The steps below apply to macOS Ventura, Sonoma, and newer versions.
- Click the Apple Logo in the top-left corner of your screen and select System Settings.
- In the left-hand sidebar, scroll down and click on Siri & Spotlight.
- Scroll to the very bottom of the right-hand pane and click the Spotlight Privacy… button.
- A small window will appear showing a list of locations Spotlight is not allowed to search. Click the + (Plus) button at the bottom left of this window.
- A Finder window will open. In the sidebar under "Locations," click on your Mac’s primary hard drive (usually named Macintosh HD). If you do not see it, press
Shift + Command + Cto reveal your computer’s drives. - Click Choose. You will now see "Macintosh HD" listed in the Privacy window.
- Click Done at the bottom right.
At this exact moment, Spotlight has deleted its index of your hard drive. Now, you must reverse the process to force it to rebuild.
- Click the Spotlight Privacy… button again.
- Click on Macintosh HD in the list to highlight it.
- Click the – (Minus) button at the bottom left to remove it from the privacy list.
- Click Done.
Spotlight will immediately begin rebuilding the index in the background.
Method 2: Using the Terminal (The Power User Way)
If the System Settings method fails to trigger a rebuild, or if the Settings app itself is freezing, you can force the re-index manually using a powerful terminal command called mdutil (metadata utility).
- Open the Terminal application (found in Applications > Utilities).
- To turn indexing off and delete the corrupted database, type the following command exactly as written and press Return:
sudo mdutil -i off / - Because you are using
sudo, you will be prompted to enter your Mac’s administrator password. The characters will remain invisible as you type. Press Return after typing it. - To turn indexing back on and force a fresh rebuild, type this command and press Return:
sudo mdutil -i on /
The terminal will output a message confirming that indexing is enabled for the root volume (/).
How Long Does the Rebuild Take?
Rebuilding the index is an incredibly resource-intensive process. Depending on the speed of your Mac’s processor and how many terabytes of data you have stored on the drive, this process can take anywhere from 15 minutes to several hours.
During this time, your Mac’s fans may spin up, and the computer may feel sluggish. If you press Command + Space while the rebuild is happening and type a search query, you will see a small blue progress bar labeled "Indexing…" letting you know the system is actively working on the problem. Once that progress bar disappears, Spotlight will be fully functional and lightning-fast once again.