Skip to main content

Disable Spotlight for external drive

Use mdutil command to prevent indexing on external drive, I feel that is more reliable.

To check if the external drive has indexing enabled or not, run the command:

$ mdutil -s /Volumes/<VolumeName>

Indexing enabled.

To disable indexing, run the command (require user password):

$ sudo mdutil -i off /Volumes/<VolumeName>

Indexing disabled.

You can recheck the indexing status with the first command again:

$ mdutil -s /Volumes/<VolumeName>

Indexing disabled.

Source: https://apple.stackexchange.com/a/418176/458846


Another approach is to disable spotlight for all and explicit enable your home drive:

sudo mdutil -a -i off
sudo mdutil -i on /Volumes/OSX