TechJunkie is a BOX20 Media Company

Home PC Windows Rebuild LaunchServices to Fix Duplicate Entries in OS X's 'Open With' Menu

Rebuild LaunchServices to Fix Duplicate Entries in OS X's 'Open With' Menu

Rebuild LaunchServices to Fix Duplicate Entries in OS X's 'Open With' Menu

While most files in OS X are configured to open with a specific application by default, users have the option to use a handy “Open With” menu, found by right-clicking (or Control-clicking) on a file. This lets users keep a default application for viewing most files, but still have quick access to another compatible application when needed. A great example is setting OS X to open image files with Preview by default, but using the Open With menu to open the image with Photoshop for editing tasks.
However, the Open With menu can sometimes get out of control. Users who have upgraded their apps over time might find old versions referenced in the list, and those who migrate their OS X installation to a new drive could see duplicate entries.
Duplicate LaunchServices Entries in OS X Open With Menu
Something similar happened when we moved our TekRevue production Mac from an iMac to a Mac Pro. We migrated our data by cloning the iMac’s drive to the Mac Pro’s, which worked fine except we had duplicate entries of all of our applications in the Open With menu.
To fix this, we need to reset OS X’s LaunchServices database. As is the case with most actions in OS X, there are multiple ways to accomplish this task, but the fastest is to simply use a Terminal command.
Our test system is running OS X Mavericks 10.9.1, but these instructions work with OS X Lion and OS X Mountain Lion as well. To get started, close all open applications and then launch Terminal from Macintosh HD > Applications > Utilities. Copy and paste the following command at the Terminal prompt and press Return to execute it:

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

Terminal will appear to freeze for a few moments as the command is processed. When it’s finished, you’ll see a new prompt appear in the window. You can now close Terminal and head back to your Desktop. Find a file you need to access using the Open With menu and you’ll now see that the list is cleaned up, with duplicate and outdated entries gone.
Rebuilt LaunchServices Entries in OS X Open With Menu
Note that we didn’t have to reboot our Mac to see the results of the command, but if you don’t see a change on your end, try rebooting before resorting to other methods.

Alternative Methods of Rebuilding LaunchServices

The Terminal method described above is easy and may not even require a reboot, but there are two other ways to rebuild LaunchServices if you are so inclined. The first is to use an application called OnyX, which can perform and automate a number of OS X maintenance tasks. Once you launch OnyX, you’ll find LaunchServices listed in Maintenance > Rebuild. Just check the LaunchServices box and press Execute to rebuild it.
Another option is to manually delete the LaunchServices preference file. Quit all open applications and navigate to ~/Library/Preferences. Locate com.apple.LaunchServices.plist, delete the file, then reboot your Mac. This should accomplish the same result as using OnyX or the Terminal command, above.

Office for iPad Reportedly Set to Launch in the First Half of 2014

Read Next 

5 thoughts on “Rebuild LaunchServices to Fix Duplicate Entries in OS X's 'Open With' Menu”

CreaLady says:
In Sierra High i have the same problem and i tried this but the nex day the jpg opens with Preview again instead of photoshop.
Is there someone with the same issue? And what can i do to fix it?
Carol F Metzger says:
com.apple.LaunchServices.plist does not appear to exist in El Capitan
Stijn lauwerys says:
After updating to 10.11.3 on one of our MacPro’s we appeared not to have any functional applications left, not even terminal or other system services. From Terminal it was clear everything was still there though. I deducted launch services had to be the corrupted in some way. This problem also slowed the MacPro to a crawl. Using the terminal command above from an other computer things returned to normal, except for the icons in the dock. That got solved by deleting dock preferences and restarting the dock. Your suggestion seems to solve more problems with launch services than stated here. Lots of thanks!
henrybowman says:
Indeed. In my case, I had an AppleScript that was adamantly failing to launch a particular app for months, and wouldn’t run unless the app was manually opened beforehand. Someone suggested this procedure and it fixed the problem immediately.
Grande Americano says:
We have just released several apps – Contact Clearout and Contact Duplicates – on the Mac App Store designed to give you full control over duplicate removal.
Both apps allow you to review the duplicates side-by-side before deleting (with drag and drop editing between them).
They also root out the duplicates that cause hidden problems – the duplicates that aren’t identical – duplicates entered in different ways on different platforms.
there’s more info at http://www.grandeamericano.com or on the Mac App store.
David Condrey says:
Just run this in Terminal. /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

Leave a Reply

Your email address will not be published. Required fields are marked *


Jim Tanous

Feb 13, 2014

676 Articles Published

More