Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Big Ron

macrumors 6502
Original poster
Dec 7, 2012
425
106
United Kingdom
Does anyone know of a fool proof way to stop Spotlight automatically indexing my external drive DESPITE me adding into the private/ignore list?

No matter how many times I instruct Spotlight to ignore my external drive - once I connect it it will start to index it. If I add the drive to the private/ignore list once connected Spotlight stops indexing but as soon as I connect it up again off Spotlight goes attempting to index it.:confused:

Help:mad::mad:

Im using Yosemite 10.10, but it did it to me using Mavericks
 
Does anyone know of a fool proof way to stop Spotlight automatically indexing my external drive DESPITE me adding into the private/ignore list?

No matter how many times I instruct Spotlight to ignore my external drive - once I connect it it will start to index it. If I add the drive to the private/ignore list once connected Spotlight stops indexing but as soon as I connect it up again off Spotlight goes attempting to index it.:confused:

Help:mad::mad:

Im using Yosemite 10.10, but it did it to me using Mavericks

you can add a root level file to stop spotlight

sudo touch .metadata_never_index
 
Excellent thanks ssls6.

I'm not however a "command line ninja" therefore:

If Iopen up a terminal prompt and type this in - how does my Imac know to stop indexing on the external drive but continue indexing on my internal drive:rolleyes:

Thanks
 
Excellent thanks ssls6.



I'm not however a "command line ninja" therefore:



If Iopen up a terminal prompt and type this in - how does my Imac know to stop indexing on the external drive but continue indexing on my internal drive:rolleyes:



Thanks


That's what puzzles me too!
 
how does my Imac know to stop indexing on the external drive but continue indexing on my internal drive
Good question, indeed ;)

The right command is :

Code:
sudo touch /Volumes/Name_of_volume/.metadata_never_index

Replace Name_of_volume with the actual name of the volume you want to exclude from Spothlight.

Example : if name of the volume = Clone

Code:
sudo touch /Volumes/Clone/.metadata_never_index
If the name of the volume has a space in it, as "My Clone", you must replace the space with \ plus a space.

Code:
sudo touch /Volumes/My\ Clone/.metadata_never_index

How to revert :

Code:
sudo rm -f /Volumes/Name_of_volume/.metadata_never_index

You need to be in an admin account to use the "sudo" command.
 
Last edited:
Spotlight always indexing

Good question, indeed ;)



The right command is :



Code:
sudo touch /Volumes/Name_of_volume/.metadata_never_index



replace Name_of_volume with the actual name of the volume you want to exclude from Spothlight.



Example : if name of the volume = Clone



Code:
sudo touch /Volumes/Clone/.metadata_never_index

If the name of the volume has a space in hit, as "My Clone", you must replace the space with \ plus a space.



Code:
sudo touch /Volumes/My\ Clone/.metadata_never_index



How to revert :



Code:
sudo rm -f /Volumes/Name_of_volume/.metadata_never_index



You need to be in an admin account to use the "sudo" command.


Great answer to a good question! Thanks for your simple explenation for terminal noobs like me! ;)

Cheers
 
Last edited:
Another thank you to Bruno for a very useful post.

I particularly liked the way you provided "guided examples" of how to use the Terminal commands...

One more question:
Do you know the proper terminal command to completely disable virtual memory in Yosemite?
 
Another thank you to Bruno for a very useful post.
Thank you.
I am not a Terminal guy, though.

To disable virtual memory, you might take a look at this.

This is 2 years old, however on Yosemite, as far as I can see, the "com.apple.dynamic_pager.plist" file is in the same place and looks the same as on Mountain Lion and Mavericks.

But take it with a grain of salt as I can't confirm that it works on Yosemite.
I simply don't know and have not tested.
 
Spotlight always indexing

The first thing I do is uncheck everything in Spotlight setting. I Never use it anyways.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.