Duplicate entries in "Open With" menu in Finder even after rebuilding Launch Services
In Mac OS X 10.8.2, I have this curious problem. Every time I install a new updated version of one of several applications that I use, my system adds a new duplicate entry in the "Open With" contextual menu:
I have tried clearing caches and rebuilding disk permissions and rebooting, but the problem persists.
I have completely rebuilt the Launch Services database and completely rebuilt Pre-Binding, more than once, by using the standard command line tools and using two different commercial cleaning utilities to do the same thing.
I have also deleted and rebuilt Spotlight and then rebuilt Launch Services and cleared caches again.
Nothing has any effect.
It seems there have been similar questions posted here before, and all of them are incorrectly answered by "Rebuild the Launch Services database" but that does not help the problem.
Update 18 January 2013
After filing a bug report with Apple, I have received a notification that this is a known bug that they are already tracking and working on. It is Bug ID# 11582257, for anybody who follows these things.
Update April 2013
This bug has not been fixed in Mac OS X 10.8.3.
Update June 2013
This bug has still not been fixed in Mac OS X 10.8.4.
Solution 1:
I have found a Terminal command that works in Mountain Lion. It gives the correct sequence of commands for lsregister
to correct this problem:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
This was provided by one Dr. Drang on the blog at LeanCrew.com in a post called Getting rid of Open With duplicates. It was posted on February 16, 2013.
You can read the blog post at the link above for all the details.
Presumably, until Apple fixes this known bug, it may be necessary to re-run this command every time a new version of an app gets installed on my system, causing new duplicate items in the Open With menu.
I must admit that this string was suggested by bmike on January 12, 2013. But for some reason I overlooked it earlier. So thanks, bmike.
Solution 2:
Do check Wheat's answer where he discovered the circumstances where OS X has a bug and the duplicates are caused by updating an App from the App Store.
For others where this isn't caused by a specific bug in Mountain Lion, the rebuilding has ruled out a stale launch services database, you should now rebuild your entire spotlight database.
This assumes you don't really have several copies of PDFPenPro - so you might run mdfind app_name
before and after rebuilding spotlight since that is the likely cause of duplicate entries.
This might also be a good time to be sure your backups are current - random filesystem errors, incompatible utilities, or impending disk failure also could explain the database continuing to get rebuilt with duplicate entries.