Search code examples
macossearchspotlight

How search on external drive without adding applications to open with menu?


On OS X, when you allow an external drive to be indexed by Spotlight, this results in a very annoying bug: all applications that you have backed up on this drive will be added to the "open with" menu on OS X.

So right-clicking on a PNG will show all applications that can open it at least twice, sometimes more.

For this reason I do not index my external drives with spotlight, but now it seems that I can't search those drives at all any more. Even when clicking on the drive and entering a search term results in nothing.

Is there a way to search a drive without entering its contents to the 'open with' menu?


Solution

    1. Open the Spotlight pane in System Preferences.
    2. Select the Privacy tab.
    3. Drag the Applications folder from the partitions that you don't want indexed into the list area.

    Shortly thereafter the duplicate results should disappear from the list, leaving applications from the one Applications folder you want.

    You might need to force a refresh the LaunchServices database afterward too.

    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

    Finally restart the Finder with the following command to rebuild any data cached within the Finder.

    killall Finder

    Spotlight

    Make sure you do not put there whole drive because this will disable spotlight as a whole. So the recommendation is to keep apps in certain folder.