Skip to content

Instantly share code, notes, and snippets.

@adamstac
Last active November 18, 2024 02:24
Show Gist options
  • 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