You are here

Mac OS X "Open With" Context Menu Shows Duplicate Entries

Like many of its underlying features & functionality, Mac OS X inherited context menus from the NEXTSTEP operating system. Also known as "contextual menus" (which I find clumsier to say), they pop-up upon user interaction such as a right-click of the mouse. For all you die-hard, one-button mouse users, they are available by holding the control key when clicking the mouse button. But you probably knew all that already or you wouldn't be here.

If your "Open With" context menu shows applications that are no longer installed, or shows some of them as duplicates, you can use the following Terminal command to rebuild your LaunchServices database. This is one of those minor things that has bugged me off & on for years but was never annoying enough to fix. Then one day I had some extra time on my hands.

Well, it turned out to be one of the easiest solutions to find & fix I've ever had. In the terminal enter the following. Be sure to either type it all on one line or include the backslashes for continuing on multiple lines.

/System/Library/Frameworks/ApplicationServices.framework/\
Frameworks/LaunchServices.framework/Support/lsregister \
-kill -r -domain local -domain system -domain user

To view the entire database in plain text format:

/System/Library/Frameworks/ApplicationServices.framework/\
Frameworks/LaunchServices.framework/Support/lsregister -dump

Kudos once again to maxosxhints.com. It may take a few minutes to rebuild the databases from all three domains, and then the results may not appear right away. I'm not sure how often or when the database is reloaded. It may only be when Finder launches, so you could probably relaunch the Finder or just log out and back in again.