Clean up your crazy Open With menu

Sometimes you don't always want to use the default application to open a given file. Say for example, you want to edit an image in Pixelmator, but the image is a screenshot you produced through the corresponding keyboard shortcut within Mountain Lion. Presuming you've never bothered to change the default application with which OS X opens such files (Preview), you can easily Ctrl+click on the object and visit the Open With… option. To your surprise, your options look something like this:

Too many apps

What the hell?

Luckily enough, there's an easy way to cull through this madness and fix this list so that only one entry for each application shows. To resolve the issue, you'll need to launch Terminal and enter in the following command:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/ Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

The result is a much cleaner Open With… menu:

Clean app menu


I'm not exactly sure what causes this insanity to ensue. I can only surmise it has something to do with the entries not being completely removed from the Launch Services framework either when an application gets updated or reinstalled. Regardless of the cause, killing the register that stores this information will reset the entries. Don't worry though, this process is set to automatically respawn when it's terminated using the -kill switch so a manual relaunch isn't necessary. Some users on the Apple Support Community forums report this temporarily fixed their issue, but it later resurfaced. For me, I haven't noticed any reoccurring craziness. I think the solution for this is two-fold: rapid installations and dirty uninstalls should be avoided and system maintenance is what it suggests - a necessary action you need to take more than once in a lifetime.