Skip to content

Instantly share code, notes, and snippets.

@siberex
Last active July 14, 2025 22:47
Show Gist options
  • Save siberex/10473e3a8f657dd57f3d9b21f9e93fd0 to your computer and use it in GitHub Desktop.
Save siberex/10473e3a8f657dd57f3d9b21f9e93fd0 to your computer and use it in GitHub Desktop.
MacOS Spotlight issues

First steps

sudo killal mds
sudo killall -9 mds

mdutil

# 1. Show volume indexing status:
sudo mdutil -s /
# If you get "Spotlight server is disabled." -> do `sudo killal mds`

# 2. Turn indexing off and on:
sudo mdutil -i off /
sudo mdutil -i on /

# 3. If step 2 is not enough — erase and rebuild index:
sudo mdutil -E /

Additional diagnostics

sudo mddiagnose

/usr/bin/find / -name .metadata_never_index -maxdepth 1
/usr/bin/find /System/Volumes/Data -name .metadata_never_index -maxdepth 1
/usr/bin/find /Volumes -name .metadata_never_index -maxdepth 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment