Skip to content

Instantly share code, notes, and snippets.

@adamstac
Last active May 1, 2024 17:11
Show Gist options
  • Star 22 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save adamstac/1249295 to your computer and use it in GitHub Desktop.
Save adamstac/1249295 to your computer and use it in GitHub Desktop.

Disable:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Enable:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Commands

Disable the index:

mdutil -i off /

Enable the index:

mdutil -i on /

Erase the current Spotlight index:

mdutil -E /

Help

Usage: mdutil -pEsa -i (on|off) -d volume ...
	Utility to manage Spotlight indexes.
	-p             Publish metadata.
	-i (on|off)    Turn indexing on or off.
	-d             Disable Spotlight activity for volume (re-enable using -i on).
	-E             Erase and rebuild index.
	-s             Print indexing status.
	-a             Apply command to all volumes.
	-V vol         Apply command to all stores on the specified volume.
	-v             Display verbose information.
NOTE: Run as owner for network homes, otherwise run as root.

Sources:

@adamstac
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment