How to change the list of “Open With” applications

finder

I'd like to reduce the set of apps for certain file types. For example, I'd like the 3-4 text editors currently associated with .php files to remain, but I'm never going to have a need to open PHP files in Monodraw or Numbers, so I'd like to remove them from the list.

I see similar questions here about a bug involving multiple apps, but that just involves recreating the list rather than altering it.

Best Answer

So one way would be to manually remove the association of these apps for the specific file type.

Basically for this you have to edit the "info.plist" file contained by the specific app package and remove the file type associations.

  • Go to the app you want to ban and right-click on it.
  • Click on Show Package Contents.
  • Open the Contents folder.
  • Open Info.plist with any text editor, like TextEdit.
  • Look for CFBundleTypeExtensions, which should show up several times. Under that, you should see a few lines that have file name.
  • Once you find the suffix you want to take off (in my case. it's the png line), delete it from the text editor and save the file.
  • Lastly, open Terminal and enter the killall Finder command. [to restart the finder]

(Source: https://mac-how-to.gadgethacks.com/how-to/remove-duplicates-customize-open-with-menu-mac-os-x-0157100/, point "How to Delete a Specific App from 'Open With'")

There may be another easier way to do this.