How to Stop macOS from Automatically Indexing External Drives with Spotlight

The Background CPU Drain

macOS includes Spotlight, a powerful system-wide search engine that indexes the contents of every file on your Mac — documents, emails, photos, application data, and even the text inside PDFs. Spotlight automatically indexes new files as they are created or modified, and it aggressively re-indexes entire drives when they are connected for the first time or after a macOS update. When Spotlight is indexing, the mds and mdworker processes consume significant CPU and disk I/O, causing fans to spin up, battery to drain faster on laptops, and general system slowdowns. This is particularly frustrating when you connect a large external hard drive containing terabytes of media files that you never intend to search through via Spotlight.

Excluding Drives from Spotlight Indexing

To stop macOS from automatically indexing specific drives or folders with Spotlight, you must add them to the Spotlight privacy exclusion list.

Click the Apple Logo in the top-left corner and select System Settings. In the left-hand sidebar, click on Siri & Spotlight (or just “Spotlight” on older macOS versions). Scroll down to the bottom of the Spotlight settings and click on Spotlight Privacy…. A window will appear listing locations that are excluded from indexing. Click the + (plus) button. Navigate to the external drive, folder, or volume you want to exclude and click Choose. That location will now be completely ignored by Spotlight. To stop Spotlight from indexing entirely (including your internal drive), you can add your main Macintosh HD volume to this list, though this will disable Spotlight search system-wide. Alternatively, to temporarily halt an active indexing operation without permanently excluding a drive, open Terminal and run sudo mdutil -i off /Volumes/YourDriveName. To re-enable indexing later, run sudo mdutil -i on /Volumes/YourDriveName.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.