Thursday, March 28, 2024
spot_img

Stopping Spotlight from indexing once started

Sometimes I insert a drive and Spotlight starts to furiously go about indexing it. It the drive is not mine, or I simply don’t want it index, and/or it has a lot of data on it which I don’t want to wait around for Spotlight to index… there’s a quick way to stop Spotlight using a terminal command.

sudo mdutil -i off /PATH

/PATH is most likely going to be /Volumes/[DRIVE NAME] if it is a whole drive you wish to stop Spotlight from indexing. For instance, to stop it from indexing my friend’s backup drive when I plug it in, I use this command:

sudo mdutil -i off /Volumes/Backup

You will likely be prompted for a password. Type in your administrator password (which is likely your Mac account password, if your username is an administrator).

It is possible to also open the Spotlight preferences and add the drive to its Privacy list. But I understand from research online this is not the best method when the process has started.

Here’s a detailed description:

1. Let indexing begin on the volume.
2. Open Terminal, located in the Macintosh HD > Applications > Utilities folder.
3. At the Terminal prompt, type the following command, exactly as written:

  • sudo mdutil -i off /path_to_volume

where /path_to_volume is the path of the volume being indexed.

4. Press Return.
5. If prompted for a Password, type your Admin password, then press Return.

You will receive the response:

  • /path_to_volume/: Indexing disabled for volume.

under Mac OS X 10.4 or

  • /path_to_volume: Indexing disabled.

under Mac OS X 10.5 or later.

Spotlight will immediately cease to index the specified volume.

6. If you are using Mac OS X 10.5 or later, skip to step 9.

Otherwise, erase the partial index created by Spotlight under Mac OS X 10.4 . At the Terminal prompt, type the following command, exactly as written:

  • sudo mdutil -E /path_to_volume

where /path_to_volume is the path of the volume being indexed.

7. Press Return.
8. If prompted for a Password, type your Admin password, then press Return.

You will receive the response:

  • /path_to_volume/: Volume index removed.
9. At the Terminal prompt, type exit then press Return.
10. Quit (Command-Q) Terminal.

Recent Articles

spot_img

Related Stories

2 Comments

  1. This doe NOT work. Every time I try it Terminal comes back with “not valid path”. The name of the volume is “Macintosh HD”, but the damn Terminal will NOT accept it as the name of the volume? And yes, I tried /Macintosh_HD, and it still won’t work. This whole indexing is garbage and is so infuriating. I should be able to STOP it when I want to!
    sudo mdutil -i off /Macintosh_HD this will NOT work.

    • try sudo mdutil -i off /Volumes/Macintosh\ HD
      In terminal you need to take care of the spaces by putting a \ in front of them. And also you need to start with /Volumes because that’s where the disk is mounted on.

      Arjen

Leave A Reply

Please enter your comment!
Please enter your name here

Stay on op - Ge the daily news in your inbox