Benches macOS

7

Spotlight Indexing External USB Drive?

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

How can I instruct Spotlight to not start indexing an external drive at the instant the drive is connected?

I know that I can go to System Preference | Spotlight | Privacy and drag the drive to the list of excluded items. But how can I do this before the drive is actually connected?

Is it possible to totally disable Spotlight while the external drive is connected?

7 replies

Sign in or join Beachball Help to reply.

  1. 0

    baltwo

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Mount the HD, launch the Terminal app, copy and paste this command into its window, hit the space bar, drag the HD's Desktop icon into the Terminal window, hit the return key, enter your admin password, carefully because nothing will show up on the screen, and hit the return key:

    *sudo mdutil -i off*

    As an example, if the ext HD's name was
    Freddy, the command would look like this:

    +*sudo mdutil -i off /Volumes/Freddy*+

    Next, run this command (using the same example, so substitute the HD's actual name):

    *sudo mdutil -s /Volumes/Freddy*

    which should return:

    /Volumes/Freddy:

    +Indexing and searching disabled.+

    Quit the Terminal app.

  2. 0

    baltwo

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Mount the HD, launch the Terminal app, copy and paste this command into its window, hit the space bar, drag the HD's Desktop icon into the Terminal window, hit the return key, enter your admin password, carefully because nothing will show up on the screen, and hit the return key:

    *sudo mdutil -i off*

    As an example, if the ext HD's name was
    Freddy, the command would look like this:

    +*sudo mdutil -i off /Volumes/Freddy*+

    Next, run this command (using the same example, so substitute the HD's actual name):

    *sudo mdutil -s /Volumes/Freddy*

    which should return:

    /Volumes/Freddy:

    +Indexing and searching disabled.+

    Quit the Terminal app.

  3. 0

    i.3d

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Or one could go to the system preferences, click on spotlight, and add the volume to the list in the "Privacy" tab, but I guess this would be not cool enough...

  4. 0

    baltwo

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    That retains the setting on the current boot volume using that HD and its asscociated volumes. However, if you boot with another volume, you'll have to repeat your steps. My solution stores that data on the ext HD's volumes (assuming that you apply it to each one) and will work with any boot volume. Some of us have multiple boot volumes and ext HDs and find my solution is a better one, even if it does involve using the built-in command line tools, which some find intimidating and somewhat frightening.

  5. 0

    nkh

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi Baltwo,

    Your instructions are appreciated. But I'm still left with the fact that before these Terminal instructions have even begun to be input, indexing has already commenced! How can this activity be precluded?

  6. 0

    baltwo

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Enter the commands and indexing will be disabled. Unhook the HD and reconnect it. Indexing won't start.

  7. 0

    Irish Apple Fan

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Is there a reverse of this, in that you can force it to index an external HD every time it's plugged in?