Sweepfor Mac

Free up storage

How to Clear and Rebuild Spotlight's Index on Mac

Spotlight not finding files, returning weird results, or showing wrong previews? Here's how to clear and rebuild its index on macOS.

7 min read

Spotlight has been the Mac’s universal search since Tiger in 2005, and when it works it’s invisible. When it doesn’t, you get the standard set of frustrations: searches return nothing, files you know exist don’t show up, calculator suggestions stop appearing, or the whole thing starts feeling slow.

The fix is usually a Spotlight reindex. Here’s the proper way to do it on macOS Sonoma 14 and Sequoia 15, plus what’s actually being rebuilt.

How Spotlight stores its index

Spotlight maintains a separate index per volume. The system disk’s index lives at /.Spotlight-V100/ (root of the drive — hidden by default). External drives also have their own .Spotlight-V100/ folders at their root.

Inside the index folder:

  • Store-V2/ — the actual index database
  • VolumeConfiguration.plist — what’s indexed and what’s not
  • Various shard and journal files

The index is large — often 500MB to several GB on a heavy-use Mac. It tracks file names, contents, metadata, and a lot more.

The first thing to try: reindex via System Settings

Apple’s intended approach uses System Settings:

  1. Open System SettingsSpotlight (or Siri & Spotlight in Sonoma).
  2. Click the Search Privacy button.
  3. Drag your hard drive (or the folder you want to reindex) into the privacy list. This stops Spotlight from indexing it.
  4. Wait a few seconds.
  5. Remove the drive/folder from the privacy list.
  6. Spotlight rebuilds the index from scratch for that location.

The reindex runs in the background. It can take 30 minutes to several hours depending on how many files you have.

Tip: While reindexing, your Mac will use noticeably more CPU and energy. mds_stores and mdworker processes do the work. Plug in if you're on battery.

The Terminal way (faster for advanced users)

If you prefer Terminal:

sudo mdutil -E /

The -E flag erases and rebuilds the index for the path you specify. / is the root volume.

For a specific external drive:

sudo mdutil -E /Volumes/MyDrive

You’ll be prompted for your admin password. Indexing starts immediately.

To check status:

mdutil -s /

Shows whether indexing is enabled and currently running.

Disabling Spotlight (if you don’t want it)

Some power users prefer to disable Spotlight entirely (using a third-party launcher like Raycast or Alfred instead).

To disable indexing system-wide:

sudo mdutil -a -i off

To re-enable:

sudo mdutil -a -i on

The -a flag means “all volumes”. -i turns indexing on or off.

Disabling Spotlight stops indexing but doesn’t delete the existing index immediately. To delete it:

sudo rm -rf /.Spotlight-V100/

Warning: don’t do this casually. The index will rebuild itself if Spotlight is on. If Spotlight is off, you’ve just freed several GB of disk space at the cost of system search.

When you should rebuild Spotlight

Common reasons:

  • Searches returning no results for files you know exist
  • Spotlight returning very old results (renamed/moved files showing wrong locations)
  • Calculator/conversion functions broken in Spotlight
  • App search not finding installed applications
  • Slow search performance
  • Mail.app search broken (it uses Spotlight’s index)
  • File previews missing or wrong in Spotlight

If you’ve recently restored from a Time Machine backup, migrated to a new Mac, or done a major macOS upgrade, the Spotlight index sometimes ends up in a weird state. Reindexing fixes it.

Skip the manual huntSweep clears every cache across every app in one pass — Slack, Spotify, Discord, browsers, and the rest. Download Sweep free →

How long does reindexing take?

Real-world numbers from indexing a 1TB SSD with ~500GB of data:

  • 1.5 to 3 hours typical
  • Heavy on CPU during the first 30 minutes
  • Tapers off as it processes deeper indices
  • Click into Spotlight during indexing and you’ll see “Indexing…” progress

You can use your Mac normally during indexing. Just expect fans to spin up and battery to drain faster.

Excluding folders to speed things up

If you have huge folders Spotlight doesn’t need to index — Time Machine backups, Docker volumes, downloaded ISOs, etc. — exclude them:

  1. System Settings → Spotlight (or Siri & Spotlight) → Search Privacy.
  2. Click the + button.
  3. Add the folder.

Common candidates to exclude:

  • ~/Documents/Virtual Machines/
  • Any external drive used purely for backups
  • Folders containing huge databases or logs
  • Time Machine destinations
  • Project folders with millions of small files (node_modules, build outputs)

Excluding these makes indexing faster and the resulting index smaller and more useful.

What about Spotlight on external drives?

External drives index by default when first connected. The index lives on the drive itself in /Volumes/[drive]/.Spotlight-V100/.

To prevent indexing on a specific external drive:

  1. Connect the drive.
  2. System Settings → Spotlight → Search Privacy.
  3. Add the drive’s mount point.

To force a reindex on an external drive, remove it from the privacy list, then add and remove it again.

There’s a faster waySweep finds and clears caches across every app you use, all at once. Try Sweep free →

When Spotlight just won’t behave

If reindexing doesn’t fix the problem:

  1. Check launchd: sudo launchctl list | grep spotlight — make sure mds and mds_stores are running.
  2. Disk permissions: Disk Utility → First Aid on your system drive.
  3. Free space: Spotlight needs free space to operate. If your drive is 99% full, fix that first.
  4. APFS volumes: if you have multiple volumes in your APFS container, each indexes separately. Sometimes one is in a weird state.

A reindex usually solves it. If not, the issue is often deeper in macOS and might need a system reinstall (rare).

Spotlight cache versus storage

The Spotlight index isn’t really “cache” in the casual sense — it’s a search database that’s necessary for Spotlight to function. Deleting it isn’t a space-saving move; it’s a troubleshooting move. The index will rebuild and reach a similar size.

For actual storage cleanup, the things that grow without bound and are safe to clear are:

  • App caches in ~/Library/Caches/
  • Browser caches
  • Old downloads
  • Mail Downloads folder
  • iOS device backups (be careful with these)
  • Old macOS update installers

Spotlight is in the “necessary system data” category, not the “easy storage win” category.

How often to rebuild

Don’t rebuild proactively. Spotlight maintains itself.

Rebuild when:

  • Search starts misbehaving
  • After major macOS upgrades, if search feels off
  • After restoring from backup
  • After a drive recovery

Otherwise, leave it alone.

A bigger picture on Mac caches

Rebuilding Spotlight is a different kind of Mac maintenance than clearing app caches. Both are useful in different situations:

  • Spotlight rebuild: when search isn’t working right.
  • App cache clear: when storage is tight or apps are sluggish.

Sweep handles the second category — app caches, system temp files, and similar accumulated junk. For Spotlight specifically, the Terminal commands or System Settings approach above is the right tool.

Bottom line

To rebuild Spotlight’s index on Mac: either drag your drive in and out of System Settings → Spotlight → Search Privacy, or run sudo mdutil -E / in Terminal. Reindexing takes 1-3 hours typically. Expect higher CPU during the rebuild.

Spotlight stores its index at /.Spotlight-V100/ on each volume. Several GB on heavy-use Macs. Necessary for search to work — don’t delete just to save space.

← Back to all guides