Skip to main content

Disable Spotlight for external drive

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

ToFirst check status for all:

mdutil -a -s

Disable spotlight for all and enable your home drive explicit:

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

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

mdutil -s /Volumes/<VolumeName>

Indexing enabled.DRIVE

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

sudo mdutil -i off /Volumes/<VolumeName>

Indexing disabled.DRIVE

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

mdutil -s /Volumes/<VolumeName>

Indexing disabled.DRIVE

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