MainspringGuides › Rebuild Spotlight Index
macOS Guide

Rebuild the Spotlight Index on Mac (mdutil)

Updated July 2026 · 3 min read

When Spotlight can't find a file you know exists — or a Finder search comes back empty for something sitting right there on your desktop — the search index has usually gone stale or corrupt. The fix is to erase the index and let macOS build a fresh one, and the mdutil command does it in one line.

Check indexing status first

Before rebuilding anything, confirm indexing is actually turned on. Open Terminal and run:

# status of the boot volume
mdutil -s /

# status of every mounted volume
mdutil -sa

Indexing enabled. is the healthy answer. If a volume says Indexing disabled. — common on external drives — that alone explains the missing results, and you can switch it back on:

# turn indexing on for a drive (off reverses it)
sudo mdutil -i on /Volumes/DriveName

Erase and rebuild the index

The -E flag erases the existing index and immediately starts a rebuild. It only touches Spotlight's own database — none of your files are affected, so there is nothing to undo. Run:

# erase and rebuild the boot volume's index
sudo mdutil -E /

# rebuild an external drive instead
sudo mdutil -E /Volumes/DriveName

Terminal replies with Indexing enabled., which means the erase was accepted and reindexing has begun. This works identically on macOS 13 Ventura, 14 Sonoma, and 15 Sequoia.

Under the hood, the index lives in a hidden .Spotlight-V100 folder at the root of each volume. Don't be tempted to delete that folder by hand — mdutil -E retires it cleanly and kicks the indexer at the same time. Good moments to rebuild: after migrating to a new Mac, after a major macOS upgrade, or when an external drive that spent time on another machine starts returning odd results.

The System Settings alternative

If you'd rather not use Terminal, the Spotlight privacy list can force the same rebuild:

  1. Open System SettingsSiri & Spotlight (on macOS 15 Sequoia, Spotlight has its own Spotlight pane).
  2. Scroll down and click Spotlight Privacy… (labelled Search Privacy… on Sequoia).
  3. Drag Macintosh HD from the desktop or a Finder window into the list. If the drive isn't visible on your desktop, click + and add it from there.
  4. Wait about a minute, then select the drive and click to remove it.

Adding a volume to the privacy list deletes its index; removing it triggers a full reindex — exactly what mdutil -E does in one step.

How long a rebuild takes

Expect anywhere from 15 minutes on a lightly used Mac to several hours for a drive holding hundreds of gigabytes of documents and mail. While it runs:

A quick way to confirm the rebuild actually fixed your original problem: create a new file with a distinctive name, give Spotlight a minute, then search for it. A healthy indexer picks up brand-new files almost immediately, even while it's still churning through the historical backlog — so if the fresh file shows up, the older ones will follow as the rebuild completes.

While you're under the hood

While you're tuning your Mac, Mainspring turns 90+ hidden macOS settings into labelled, reversible toggles — no Terminal syntax to remember, and every change has an off switch.

Try Mainspring free →

Signed & notarized by Apple · 1-day free trial · $29 once

If Spotlight is still flaky

A rebuild fixes most missing-file problems, but check two other suspects before rebuilding again: the folder may be listed in Spotlight's privacy list (see excluding folders from Spotlight — the same list works in reverse), and if the indexer never seems to finish, mds_stores stuck at high CPU has its own set of fixes.