Spotlight eating CPU and disk? How to rebuild the index safely on macOS

When your Mac's fans spin with no app open and Activity Monitor shows mds_stores or mdworker at the top, Spotlight is re-indexing — sometimes for hours, sometimes looping forever on a corrupt index. The index database itself can also quietly occupy several GB under /.Spotlight-V100.

Check first, then act

sudo du -sh /.Spotlight-V100 2>/dev/null          # index size
sudo mdutil -s /                                  # status for the root volume

"Indexing enabled" with constant CPU for days = stuck. A multi-GB index after you deleted most files = stale.

The safe rebuild

sudo mdutil -E /          # erase and rebuild (the classic fix)
sudo mdutil -i on /       # ensure indexing is on afterwards

The rebuild re-crawls every file: expect 30 minutes to a few hours of elevated CPU on a full disk, and blurry search results until it finishes. Nothing in your files is touched — only the index.

Shrink what gets indexed

System Settings → Siri & Spotlight → Search Privacy (or Spotlight exclusions): exclude the folders that never need search — VM images, model directories, backups. Fewer indexed bytes means a smaller database and fewer re-index storms. External/backup volumes you never search can be disabled entirely with sudo mdutil -i off /Volumes/Name.

When it is not Spotlight

Background disk churn with idle Spotlight is usually backup agents or sync engines — Time Machine snapshots (guide) and iCloud materialization (guide) are the top two. For the full hidden-space map see System Data explained; to size your reclaimable total, the estimator takes ten seconds.