MDS Errors on Your Mac: What They Mean and How to Fix
In this article
MDS stands for metadata server, the part of macOS Spotlight that indexes your files so search works. Most mds errors are harmless indexing hiccups, and the fix is usually rebuilding the Spotlight index or letting mds finish scanning a large new batch of files.
Time 15 min · Steps 6 · Level Easy
What mds Errors Actually Are and When to Worry
Spotlight on a Mac is built from two processes: mds, which coordinates the index, and mdworker, which reads individual files. When you see mds or mdworker messages in Console, or notice high CPU use, the system is almost always just indexing. A new macOS install, a large folder copy, or a freshly attached external drive can keep mdworker busy for anywhere from a few minutes to an hour or more on a big drive.
A real problem looks different: mds crashes repeatedly in a loop, Spotlight searches return nothing at all, or the same file path appears in errors over and over. Those point to a damaged index or a corrupt file the indexer keeps choking on, and both have straightforward fixes below. If your Mac also runs very hot or the fan stays loud for hours with no new files added, treat that as a sign something is stuck rather than normal.
MDS Symptoms, Likely Causes and Fixes at a Glance
| Symptom | Likely cause | How to confirm | Fix |
|---|---|---|---|
| mdworker using high CPU after adding files or a drive | Normal indexing of new content | Open Activity Monitor, search for mdworker; CPU drops over time | Wait; keep the Mac plugged in and awake |
| Spotlight finds nothing | Corrupt or disabled index | Search for a file you know exists, e.g. a file on the Desktop | Rebuild the index with mdutil (steps below) |
| Same file path repeated in Console errors | A corrupt file the indexer cannot read | Console app, search for mdworker; note the path | Move or delete that file, then rebuild |
| mds restarting in a crash loop | Index database damage | Activity Monitor shows mds quitting and relaunching | Rebuild the index; if it persists, reindex from safe mode |
| High CPU right after a macOS update | Re-indexing the whole disk | Timing: starts within a day of updating | Leave the Mac on overnight once; it settles on its own |
Rebuilding the Spotlight Index, Step by Step
This is the fix for the most common real mds problem: a broken index. You will use Terminal, which is in Applications > Utilities. Menu and setting names can differ slightly between macOS versions.
- Check the indexer status. Open Terminal and type
mdutil -s /then press Return. This reports whether indexing is enabled for your startup drive without changing anything. - Erase and rebuild the index. Type
sudo mdutil -E /and press Return, then enter your administrator password when asked. The -E flag wipes the existing index and starts a fresh one. - Let the rebuild finish. mdworker will use noticeable CPU while it re-reads your files. A drive with a few hundred thousand files typically takes from ten minutes to an hour; keep the Mac awake and on power.
- Test Spotlight. Press Command + Space and search for a filename you know, such as a document on your Desktop. It should appear within a minute or two of the rebuild completing.
- Handle a stuck file. If Console keeps showing the same path, move that file to the Trash, empty the Trash, and run
sudo mdutil -E /again. - Restart if mds is crash-looping. Shut down, start up while holding the power button until startup options appear, and choose safe mode, then restart normally. Safe mode performs checks that often clear the loop.
Quick Checks Before You Assume the Worst
Run through these before any rebuilding, because most mds noise resolves itself.
- Did you recently copy a large folder, attach an external drive, or update macOS? Give indexing an hour before intervening.
- Open Activity Monitor, set the filter to md, and watch whether CPU use is falling rather than flat at a high value.
- Check that Spotlight is not set to exclude your main drive: System Settings > Siri & Spotlight > Spotlight Privacy (labels vary by version). A drive dragged into that privacy list is not indexed at all.
- Test with a simple search for a file you created today; older items may simply not be indexed yet.
- Restart the Mac once. This clears stuck worker processes more often than any other single action.
Keeping mds Quiet on Your Mac Going Forward
Most repeat mds trouble comes from the indexer being pointed at content it should skip. External drives full of backups, disk images, and system clones make mdworker churn for long stretches, so add those to the Spotlight privacy list if you never search them. Keep at least 10 percent of your startup drive free; a nearly full disk slows indexing and everything else. After major macOS updates, expect one busy evening of reindexing and plan for it rather than fighting it. If a particular folder keeps generating errors, the files inside may be damaged; copying them out and letting the originals be re-created often ends the repetition.
MDS Questions That Come Up Alongside the Fix
Can you turn mds off completely?
You can disable indexing with sudo mdutil -i off / in Terminal, which stops the CPU use but also breaks Spotlight search and some app features that rely on it, including certain search fields in Mail and Finder. Turning it back on is sudo mdutil -i on /. Disabling is a diagnostic step, not a permanent setting most people want.
Is mdworker high CPU a sign of malware?
Almost never. Genuine mdworker is doing file indexing, and its CPU use tracks with recent file changes. If you want reassurance, check Activity Monitor for the process path; legitimate mdworker runs from the system, and reputable security software can scan for anything out of place without you having to guess.
Do Windows and Linux have mds too?
The name mds is specific to macOS Spotlight. Windows does its own indexing through a separate search service, and Linux desktops such as those using GNOME have their own indexer. The symptoms look similar, high CPU after big file changes, but the commands above apply only to a Mac.
Why does mds run again after every restart?
Spotlight checks its index against the disk on startup and re-reads anything that changed while the Mac was off. Brief mdworker activity after boot is normal and should settle within a few minutes. If it runs hot for hours on every restart with no file changes, that is when the rebuild steps above apply.
Official source: Apple Support