MacOS – Why does the Mac’s list of “Open with” applications start listing the apps twice and sometimes three times

desktopfindermacos

When I right-click on a file on my Mac OS desktop and then in the contextual menu, I move to the "Open with…", the list of potential applications to "open with" has applications listed multiple times, sometimes three or four times, right next to each other!

  1. Why does this happen?
  2. How do I fix it?
  3. how do I stop it from re-occurring?

See this snapshot of the contextual menu showing the doubling up:

screen shot of a menu showing doubled up apps

Now I have Mountain Lion on a 13" MacBook Pro, but this problem existed before I upgraded to Mountain Lion.

Best Answer

This happens because the LaunchServices database gets corrupted.

To fix on Mountain Lion:

  1. Open Terminal.app in the /Applications/Utilities/ folder.
  2. run /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
  3. Restart

This command has changed over the years, but I just recently ran the above to fix the same issue on Mountain Lion. This hint on Mac OS X Hints covers the command for other Mac OS versions over the years.

If you don't like using the command line, the free tool Onyx also has an option under Maintenance -> Rebuild -> launchservices will work too.

As for how to stop it, I really haven't ever seen a way. I am not sure what actually causes it to corrupt other than I know it is very actively used.