Engineering · October 24, 2026
How to Rebuild the Spotlight Index on macOS Using Terminal (mdutil Guide)
Spotlight not finding files or showing empty results? Learn the exact Terminal commands and System Settings steps to completely rebuild your macOS metadata index.
SearchOnMac Team
macOS Core Systems · 5 min read
When macOS Spotlight suddenly stops finding files, shows outdated results, or spins endlessly on basic queries, the underlying CoreSpotlight metadata database is likely corrupt. Here is how to rebuild the index using the official mdutil utility.
Step 1: Check Spotlight Indexing Status
Open Terminal from Applications > Utilities (or tap ⌘ Space and type 'Terminal'). Run the following command to check if indexing is enabled on your startup disk:
mdutil -s /Step 2: Erase and Rebuild the Index
To wipe the existing index and force macOS to re-scan all local drives from scratch, execute:
- -E: Erases the metadata store for the target volume.
- -i on: Ensures indexing daemon (mds) is active and running.
- Enter your Mac administrator password when prompted (characters will not show).
sudo mdutil -E /
sudo mdutil -i on /Step 3: Monitor Indexing Progress
Press ⌘ Space and type any search query. If Spotlight is rebuilding, you will see a slender progress bar with the label 'Indexing…'. Depending on disk size and file count, reindexing takes between 15 and 90 minutes.
Why Reindexing Disrupts Power Users
During reindexing, Mac CPU usage and battery drain spike, fans may spin up on Intel Macs, and search results remain incomplete for hours.
SearchOnMac operates an independent, in-memory index that stays responsive regardless of Spotlight's background indexing state.
Using 'sudo mdutil -E /' fixes 95% of Spotlight search failures. For mission-critical workflows, keeping a standalone local search utility ensures you never get blocked by a reindex.