Skip to content

Instantly share code, notes, and snippets.

@gaspanik
Last active December 16, 2023 07:39
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save gaspanik/4653835 to your computer and use it in GitHub Desktop.
Save gaspanik/4653835 to your computer and use it in GitHub Desktop.
OS X: spotlight indexing switch

Spotlight Indexing switch

os x terminal command.

Turn off indexing

Turn off Spotlight Indexing

sudo mdutil -a -i off

Turn on Spotlight Indexing

sudo mdutil -a -i on

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.

Disable Spotlight

“sudo mdutil -a -i off” which turns off indexing only.

Disable Spotlight

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

ReEnable Spotlight

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

source: How to Disable (or Enable) Spotlight in Mac OS X Mavericks & Mountain Lion

@gaspanik
Copy link
Author

これをオフにしたままだとApp StoreでXcodeとかのアップデートができないので、「他のアカウントでお試しください」みたいなアラートが出た時は一回オンにしましょう。

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