Removing OS X “Open With” Duplicates

8479758031_b504e9bb2f_z

Most of the time Finder will show you multiple entries for each application when right clicking a file and choosing Open With. Getting rid of Open With duplicates gives us an alias to remove those duplicates. Below is not only the alias, but a one-line command to add the alias to your ~/.bash_profile. Just copy and paste it onto the shell and you’ll have the fixopenwith alias available.

Above that the version below is a slightly improved version: not only will it rebuild the index, it’ll also relaunch Finder and open TotalFinder (if you have it installed) after having rebuilt the index.

echo "alias fixopenwith2='/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder && open /Applications/TotalFinder.app'" >> ~/.bash_profile

Once done, just call fixopenwith and it’ll do it all automatically.

(via )

Note: also to be found in Mathias’ dotfiles, an exquisite resource I’ve been cherrypicking from lately 🙂

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.