How to prevent spotlight from searching external hard drives

5

2

I have an external hard drive connected to my Macbook Pro that I always leave on. When I use spotlight to search for something, it always searches this drive. I don't want it to do this because usually the drive is in standby mode, so it takes a while to power up when I use spotlight to find something, and usually what I'm trying to find isn't on that hard drive. How can I prevent spotlight from searching this drive?

tony_sid

Posted 2010-11-07T17:40:13.510

Reputation: 11 651

Answers

5

System Prefs --> Spotlight --> Privacy.

Add the drive(s) you want to exclude.

UPDATE:

For a scripting approach try this: Disabling Spotlight in OS X Leopard for the removable drives

Should work for Snow Leopard too.

ricbax

Posted 2010-11-07T17:40:13.510

Reputation: 4 894

The only drawback is that if you unmount the drive you will have to re-add it again in the future. – ricbax – 2010-11-07T17:47:40.923

No that's not correct. If you add it to the privacy pane, that computer (and others) will ignore it for spotlight in the future. The spotlight pane writes a .<something> file to the root of the drive, which other systems will recognize. At least that's the way it works in OS 10.6 and I believe in 10.5... – Benjamin Schollnick – 2010-11-08T13:50:18.903

@Benjamin Schollnick - You mean the hidden .Spotlight-V100 folder? You are correct but at the time of writing that comment I had not fully researched the behaviour of Spotlight indexing. – ricbax – 2010-11-08T18:19:47.797

I was thinking of the .metadata_never_index file... – Benjamin Schollnick – 2010-11-08T19:41:03.130

5

Assuming you don't want Spotlight to index the drive either, create a file,

.metadata_never_index

on the root of the drive. It will no longer get indexed, and, no index, no search. From this tip from Mac OS-X Hints.

JRobert

Posted 2010-11-07T17:40:13.510

Reputation: 6 128