Spotlight is macOS’s awesome little search tool. You hit Command + Space and *boom*, you can find anything — files, apps, emails, and even definitions. But sometimes, Spotlight goes rogue. It gets stuck in a never-ending cycle of reindexing, making your Mac hot, loud, and slow.
TLDR: Spotlight is great until it’s not.
When Spotlight keeps reindexing forever, it’s usually a sign something’s broken behind the scenes. The main culprit? Corrupt metadata. Thankfully, resetting the metadata store can solve the problem. It’s a quick, geeky fix that *actually works*.
So What Happened to Spotlight?
You were just doing your thing — browsing photos or opening that spreadsheet your boss asked for. Then your Mac started heating up. The fans kicked in. Battery life plummeted. Activity Monitor showed that *mds*, *mdworker*, and friends were feasting on your CPU like it was buffet night.
You Googled a bit and realized: Spotlight is reindexing your drive. Again. And again. Forever…
How Spotlight Normally Works
Spotlight builds a special internal catalog of all the files, emails, contacts, and other data on your Mac. This is called the Spotlight index. Indexing helps searches feel instant. Behind the scenes, processes like:
- mds — Metadata Server
- mdworker — Worker bees that scan files
…are busy tagging and cataloging your stuff.
Usually, Spotlight indexes files when they change or when you add a new external drive. It should only take a little while… unless something goes wrong.
What Makes It Get Stuck?
The loop usually starts because of one of these:
- Corrupt metadata
- A wonky external drive
- Access permission problems
- Huge files or folders it can’t handle
In some cases, Spotlight tries to index a file, fails, tries again…and then falls into an infinite loop. Like a cat chasing its tail. Forever. And ever. Amen.
Basic Fixes That Don’t Always Work
When you’re desperate, you’ll try anything. Here are the quick fixes users usually reach for:
- Add then remove the drive from Spotlight’s “Privacy” tab
- Run
sudo mdutil -E /to erase the index - Kill mds and mdworker using Activity Monitor
- Delete Spotlight folders manually
These sometimes do the trick… but often you find that reindexing just starts over. Again.
Why? Because these steps don’t fix the root cause: the corrupted metadata store.
Enter: The Metadata Store Reset
Turns out, Apple’s secret weapon for fixing this infinite loop is rebuilding the system’s hidden metadata store.
This store is where macOS keeps all the juicy searchable info Spotlight uses. If the store breaks or becomes corrupted, you get the endless cycle of reindexing.
Here’s how you fix it — for real.
Step-by-Step Fix
1. Open Terminal
You’ll need to do this from Terminal. You’ll feel like a hacker. It’s fine.
2. Disable Spotlight Temporarily
This stops processes from interfering while you do surgery.
sudo mdutil -a -i off
3. Delete the Metadata Store
Now the bold part. You’re going to delete the Spotlight volume’s metadata store. This is like resetting its memory.
sudo rm -rf /.Spotlight-V100
Do this for any other drives, too. For example:
sudo rm -rf /Volumes/YourDriveName/.Spotlight-V100
4. Re-enable and Reindex
Now turn Spotlight back on and force a reindex the *right* way.
sudo mdutil -a -i on
sudo mdutil -E /
Your Mac will rebuild everything — clean slate. It may take a while, so plug your Mac in and let it cook.
Why This Works
Unlike resetting through System Preferences or killing processes, deleting the metadata store nukes the corrupted index files completely. It’s like throwing out a broken phonebook. Spotlight then creates a fresh new one, free of corrupt entries.
This method is rarely mentioned in support articles. But seasoned Mac users and sysadmins swear by it. And yes, it works on external drives and Time Machine volumes too.
When to Be Careful
This fix is safe if you follow the steps, but keep these in mind:
- Always back up your Mac before messing with system folders.
- Don’t delete the wrong folder. Double-check the path.
- Large volumes can take hours to reindex. Be patient.
If you see errors like “operation not permitted,” it might be due to System Integrity Protection (SIP). Turning off SIP is another move entirely and usually not needed here.
Extra Tips to Avoid Future Loops
Once you fix Spotlight, keep it happy:
- Exclude sketchy or huge folders from indexing using System Settings > Spotlight > Privacy
- Don’t yank out drives while indexing
- Run First Aid in Disk Utility if Spotlight has trouble with a specific drive
Spotlight is amazing when it works. After the reset, you may be shocked at how fast it feels again.
In Conclusion… Delegate Indexing Drama
If you’re tired of watching mds eat your CPU while getting nowhere, this is the fix you’ve been looking for. A simple Terminal command, a deleted folder, and your Mac can finally rest… and so can you.
Even tech veterans can get tripped up by Spotlight’s mysterious loops. But now, you know the not-so-secret reset that actually works. Give your Mac a little spa day. Clear that metadata gunk. She deserves it.
Happy indexing!
