Our thinking


Force Spotlight to rebuild search indexes

There’s an excellent series of articles on Spotlight in recent versions of macOS over on the Eclectic Light website.

I’ve recently had a couple of machines that were not searching in Mail, among other things, and I needed to rebuild the Spotlight search index.

Initially, I used the command sudo mdutil -E / however this doesn’t seem to have done the trick.

Dragging Macintosh HD to the Search Privacy window in System Settings, waiting for a bit, and then removing it seems to have worked, and it’s quick and easy.

I wanted to know why the Terminal command didn’t work however.

As it turns out, the Data volume in the APFS Volume Group has its own index.

So, the command to rebuild the search index on the Data volume, which is arguably the most important index as it’s indexing all of your data, should instead be sudo mdutil -E /System/Volumes/Data

Or, you can rebuild all Spotlight indexes on all currently mounted volumes with sudo mdutil -Ea

Leave a Reply