fbpx

FREE! Plan Your Ideal Week: Bonus Workshop + Planner  →  Get the Workshop

Quick tip: Remove duplicates from OS X’s “Open With” menu

Opening a file in OS X is as simple as double-clicking it, but most files can be opened by any number of applications present on a system. For example, a simple .jpg can be opened from within Preview, Photoshop, Acorn and more.

Additionally, files can be opened in various applications via a single right-click in Finder. If you’ve used OS X’s “Open With” contextual menu at all, you’ve probably seen it act up, creating duplicate entries for applications that can be used to open the file in question:

Open With nightmare
Image courtesy of Dr. Drang’s much more complicated post on the subject

While not a serious issue, this particular bug can be rather annoying. Thankfully, it’s easy to fix with a quick trip to the Terminal.

(It’s important to remember that the command line is a powerful tool. While we’re nice guys here at The Sweet Setup, blindly pasting commands into Terminal from the Internet can go badly at times.)

Open Terminal from Spotlight or the Utilities folder in Finder and paste this command in:


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

Terminal

This command clears and re-builds the Launch Services database where OS X keeps track of what file types can be opened with what applications.

The command may take a few moments to run, but Terminal will return you to a command prompt once it is complete:

terminal-done
For the fix to be complete, run the killall Finder command, or simply log out and log back in to your Mac.

While a dirty Open With menu isn’t a real problem, I sleep better at night knowing things are tidy with my system. Until OS X gets better at managing its own Launch Services database, it’s nice to know how to clear things up manually.