How to Manage File Associations in macOS
In macOS, the Open With contextual menu that appears when you right-click (or Ctrl-click) on a file provides links to all the applications installed on your Mac that are associated with that file type.
At the top of the list is the default app that macOS launches whenever you double-click on files that share the same suffix or extension, with other apps associated with the file type below that, and an Other… option at the bottom which lets you choose an alternative app in case the one you want to use isn’t listed.
You can easily change the default app associated with a particular file to something else. To do so, click Get Info in the contextual menu and select another app from the Open With: dropdown list in the file’s Info pane. To use that app to open all files sharing the same extension, click the Change All… button and select Continue.
Clearing the Open With Menu
If you’ve installed a lot of applications on your Mac through the years, you may find that some apps appear in the Open With menu that really have no business being there given the kind of file you’ve selected.
As well as unrelated apps, you may even see references to “ghost” apps that you removed from your Mac long ago. All of which results in a long and cluttered list of launch service links you won’t use.
Unfortunately the list isn’t directly editable, but there are a couple of ways that you can clear the cruft from it. One option is to grab Titanium Software’s free Onyx system utility and run a task to rebuild the Launch Services database.
Alternatively, if you’re comfortable with a command prompt you can open a Terminal window and run the following command, which does the same thing:
LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
Leave the command to run for a few minutes while the LaunchServices database rebuilds, and when the prompt reappears type killall Finder and press Enter to see the changes take effect.
Discuss this article in our forums