MDS Error on Your Mac: Causes and Fixes That Work
In this article
An MDS error on a Mac almost always comes from Spotlight's indexing processes (mds, mds_stores, mdworker) hitting a corrupted index, a problem disk, or a huge batch of new files. Rebuilding the Spotlight index fixes most cases.
Time 20 min · Steps 6 · Level Easy
How to Rebuild the Spotlight Index and Clear the MDS Error
- Check Activity Monitor first. Open Activity Monitor (Applications > Utilities), click the CPU tab, and confirm mds or mds_stores is the process spiking or reporting errors. If CPU is under about 10 percent and the Mac feels normal, the error may be harmless log noise.
- Restart the Mac. A plain restart clears stuck mdworker processes. If the error returns within a few minutes of login, indexing is the culprit and you should continue.
- Pause indexing on the problem drive. Open Terminal and run sudo mdutil -i off / to switch indexing off for the startup disk. You will be asked for your administrator password; it types invisibly, which is normal.
- Erase the existing index. In the same Terminal window, run sudo mdutil -E /. This deletes the Spotlight index so it can be rebuilt from scratch. The -E flag also re-enables indexing on most systems.
- Re-enable indexing. Run sudo mdutil -i on / to switch indexing back on, then let the Mac run for 15-60 minutes while it re-indexes. Fans may spin up and the Mac may feel slower during this window.
- Verify in Activity Monitor. After the rebuild, mds and mds_stores CPU use should settle back to low single digits when the Mac is idle. If the error message no longer appears in Console after a day of normal use, the fix worked.
Which MDS Symptom Points to Which Cause
The mds family of processes runs Spotlight, so every MDS error traces back to indexing in some way. Match your symptom to the likely cause before you fix anything.
| Symptom | Likely cause | Fix |
|---|---|---|
| mds_stores using 80-100 percent CPU for hours | Large re-index after an update or a big file copy | Let it finish, or rebuild the index with the steps above |
| Repeated mdworker crashes in Console | Corrupted Spotlight index | Erase and rebuild the index (sudo mdutil -E /) |
| MDS errors only on an external drive | Failing or newly reformatted external disk | Run First Aid in Disk Utility on that drive, then re-index it |
| Spotlight searches return nothing or stale results | Index disabled or partially built | Run sudo mdutil -i on / and wait for the rebuild |
| mds errors plus overall slowness and beachballs | Disk problem rather than Spotlight itself | Check the disk with Disk Utility First Aid before touching Spotlight |
How to Confirm the MDS Fix Actually Worked
Three checks tell you the problem is gone, in the order worth doing them. First, watch Activity Monitor for 10-15 minutes of normal use: mds and mds_stores should sit near the top of the idle list only briefly, not pinned at high CPU. Second, open Console (Applications > Utilities), search for "mds" in the search box, and confirm no new error entries appear after the rebuild. Third, run a Spotlight search (click the magnifying glass, or press Command+Space if your keyboard has that shortcut) for a file you created this week; if it appears within a second or two, the fresh index is working.
One caveat: right after the rebuild, errors in Console from the rebuild window itself are expected. Judge only the entries that appear after indexing finishes.
Quick Checks Before You Go Deeper
Work through these in order; they rule out the simple causes in about five minutes.
- Did you just copy tens of thousands of files, restore a backup, or install a large update? Indexing that volume can take an hour or more and is not an error.
- Is the error tied to one external drive? Eject it and see whether the mds errors stop; if they do, the drive is the cause, not your Mac.
- Have you restarted since the errors started? Stuck mdworker processes often clear on their own after a restart.
- Does Disk Utility First Aid report any problems on the startup disk? Repair or back up before rebuilding the index, because a failing disk will keep corrupting it.
- Is the drive nearly full? Spotlight behaves badly when a disk has only a few gigabytes free; clear space first.
What If the MDS Error Comes Back After Rebuilding?
A returning error usually means the index keeps getting corrupted, and the two usual reasons are a disk fault or a specific problem file. Run Disk Utility First Aid on the startup disk, and if that passes, exclude folders one at a time using the Spotlight privacy list: System Settings > Siri & Spotlight > Spotlight Privacy (the exact labels can differ slightly by macOS version), drag a suspect folder in, wait a few minutes, and see whether the errors stop. Large mail archives, synced cloud folders, and old backup folders are the usual offenders. Removing a folder from that list later triggers a fresh index of just that folder.
Is It Safe to Force Quit mds or mds_stores?
Force quitting from Activity Monitor is safe but rarely useful, because macOS relaunches the process within seconds and it resumes where it left off. It will not damage files or the index. If you want the processes to actually stop, use the mdutil commands above, which stop indexing cleanly instead of killing it mid-write.
Can You Just Turn Spotlight Indexing Off Permanently?
You can: sudo mdutil -i off / disables it system-wide, and the mds errors will stop because there is nothing to index. The trade-off is that Spotlight search, Finder search, and some app search features stop returning results, so treat this as a diagnostic step or a last resort rather than a fix. Re-enabling it later with sudo mdutil -i on / starts a full rebuild, so expect another busy hour.
Official source: Apple Support