mds_stores

macOS Sonoma Spotlight Stuck on 'Indexing...' With mds_stores High CPU

Spotlight hangs on 'Indexing...' and mds_stores pegs your CPU. Here's how to actually reset the index without nuking your Mac.

You open Spotlight with Cmd+Space, and it just sits there. Up in the menu bar, the little magnifying glass still has that faint dot next to it. You check Activity Monitor, and mds_stores is chewing through 180% CPU like it's mining crypto. Fans spinning, battery dropping, and the indexing progress bar under System Settings > Siri & Spotlight hasn't budged in two hours. This is what people mean when they say "Spotlight is stuck on Indexing."

The usual trigger is a big change. You copied a 400 GB Photos library from an external drive, restored from a Time Machine backup, upgraded to Sonoma from Ventura, or plugged in a slow USB drive that macOS is trying to index byte by byte. One wrong file — a corrupt .pkg, a giant video file with weird metadata, or a sparse bundle that keeps changing — and the indexer gets wedged. It never finishes. It never fails cleanly. It just grinds.

What mds_stores is actually doing

mds_stores is the metadata server. It's the daemon that writes the Spotlight index to disk. When you see 100% CPU on mds_stores, the indexer has hit something it can't reconcile — usually a file whose metadata keeps changing while it's being read, or a huge directory that's being written to faster than the indexer can walk it.

Sonoma changed how Spotlight handles some file providers (iCloud Drive, Dropbox, OneDrive with File Provider extensions). If a cloud sync client keeps touching files, Spotlight will restart the same scan over and over. That's the loop. That's why the progress bar never moves.

Rebooting doesn't fix it, because Spotlight resumes the same stuck scan on boot. The real fix is to force a clean rebuild — but only of the volumes that are actually stuck, not your entire system.

Fix it step by step

Before you touch anything, make sure you have a Time Machine backup. Rebuilding the index is safe, but it takes a while and you don't want surprises.

  1. Open Terminal. Press Cmd+Space, type Terminal, hit Enter. If Spotlight is too broken to launch apps, go to Applications > Utilities > Terminal.
  2. Check what Spotlight thinks the status is. Run:
    mdutil -as
    You'll see one line per mounted volume. Look for the one that says Indexing enabled. next to the volume that's stuck. If your external drive shows up here and you don't want it indexed, that's a clue already.
  3. Check which process is actually eating CPU. In Activity Monitor (Applications > Utilities), search for mds. You'll usually see three: mds, mds_stores, mdworker. If mds_stores is the one above 100%, it's the index writer. If mdworker is the one, it's hurting on a specific file — that's a different problem and points to a broken file type plug-in.
  4. Turn Spotlight off for the affected volume. Replace Macintosh HD with your actual volume name if it's different. You can find the exact name by running df -h.
    sudo mdutil -i off -d /
    Enter your admin password. You should see: /: Indexing disabled.
  5. Erase the existing index. This is the part people skip.
    sudo mdutil -E /
    Expected output: /: Indexing enabled. and then it starts deleting the old index. Don't panic if your Mac gets cranky for a minute. It's removing the .Spotlight-V100 folder contents.
  6. Turn indexing back on.
    sudo mdutil -i on /
    You should see: /: Indexing enabled.
  7. Watch the rebuild. Open Activity Monitor, sort by CPU, and watch mds_stores. It will spike hard for the first 5–15 minutes, then settle. On a Mac with a 1 TB SSD and roughly 500,000 files, expect the first pass to take 20–40 minutes. On an M1 MacBook Air, faster. On a 2018 Intel Mac mini with a spinning drive, slower — sometimes hours.
  8. If it's stuck on an external drive instead, do the same for that volume.
    sudo mdutil -i off -d /Volumes/YourDriveName
    sudo mdutil -E /Volumes/YourDriveName
    sudo mdutil -i on /Volumes/YourDriveName
    Honestly, if it's a backup drive or a scratch disk, just leave indexing off. Spotlight on external drives is overrated and it's a common cause of exactly this problem.

What to do if it's still stuck

If mds_stores is still at 100% after a full rebuild, the index itself isn't the problem — a file is. Run this to see what Spotlight is currently chewing on:

sudo fs_usage -w -f filesys mdworker

You'll get a stream of file paths. Let it run for 30 seconds, then hit Ctrl+C. If the same folder keeps showing up, that's your culprit. Common offenders: a Dropbox folder that's mid-sync, a Photos library being imported, a Docker.raw sparse image that's constantly being written to, or a Parallels/VMware VM bundle. Quit the app that owns that folder, wait for it to settle, and then re-run the index rebuild.

Other things worth checking:

  • Log in to iCloud. If you're signed out or in a weird state, iCloud Drive's File Provider can spam the indexer. System Settings > Apple ID > make sure you're signed in and it's not stuck syncing.
  • Third-party sync clients. Dropbox, Google Drive, and OneDrive all have File Provider modes now. If any of them is stuck syncing, Spotlight will be stuck too. Quit them and see if mds_stores drops.
  • Corrupt index plist. Very rare, but if you've tried everything, nuke the whole Spotlight config and reboot:
    sudo rm -rf /.Spotlight-V100
    sudo rm -rf ~/Library/Caches/com.apple.Spotlight
    sudo reboot
    macOS will recreate both on next boot and reindex from scratch. Expect a full rebuild to take a couple hours on a busy machine.

One last thing: if the progress bar in System Settings still says "Indexing..." but mds_stores CPU is at 0%, it's done. That bar is known to lie in Sonoma. It'll sit there until you either reboot or toggle the Spotlight privacy list. Don't rebuild the index a second time because the bar is wrong — check CPU first.

Rule of thumb: rebuilding is safe, but if you rebuild more than twice for the same volume and it's still stuck, the problem is a specific file or app writing to disk, not Spotlight itself. Chase the file, not the daemon.
Related Errors in macOS Errors
Operation not permitted macOS Errors: Fix 'Operation Not Permitted' on Terminal Fix com.apple.launchd.peruser Error Crash Loop on macOS macOS app won't open: fixing Gatekeeper and quarantine flags macOS 'A Disk Error Occurred' When Emptying Trash: Fix Stuck Files

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.