How to disable file associations to an app before/after installing

applicationsdefaultsfilesystemfinderterminal

I found this app that I needed to disable from association to music and video files that it's capable of opening, and the app doesn't have an option to disassociate filetypes.

It's a media player, and after installation, it tends to become the default app for both music and video filetypes.

Is there any terminal command to dissociate the apps from any filetype it's defaulted to?

If not, any way to disable it from associating files as a default player for those filetypes?

Thanks!

Best Answer

lsregister is the command to deal with Launch Services. To unregister an app use the -u option and the path to the app bundle. lsregister is not in the PATH - you have to use the full path to the executable:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -u /Applications/MediaPlayer.app