Runar Ovesen Hjerpbakk

Science-based software development

Remove duplicated entries for same application in Finder context menu

Symptom

Multiple duplicated entries for the same application in the OS X Finder Open With context menu. I first noticed this after upgrading to Mountain Lion (10.8).

Duplicate entries pre

Solution

  1. Open Terminal.app
  2. Run the following command:
/System/Library/Frameworks/CoreServices.framework//Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user

The lsregister command is used to query and reset the Launch Service database. This is the database used to determine the default application and it controls the contents of the Open With context menu.

The result can be seen in the screenshot below. All the duplicated entries from before are now gone.

Duplicate entries post

For more information, read lsregister: How Files Are Handled in Mac OS X.

Cause

Still unknown, but the problem has yet to reappear. This reminds of the Everything's broken and nobody's upset post by Scott Hanselman.

The answer? Uninstall, reinstall, stop, start, restart.