When you right-click a file you can select from the context menu "open with", to select the app you want to open the file with. If I want to prevent(or remove or hide) an app to show in the context menu, how do I do it? Thanks.
The only real way to do this is to uninstall the app.
You can modify the app's
.desktop file to indicate that the app cannot handle that file type, but that comes with a couple obvious drawbacks:
You are telling the system that this app cannot handle that file type at all. Which means anywhere the system tries to list apps that open that file type, it will no longer recognize that app
Any time you get an update for that app that affects the
.desktopfile, your changes will be overwritten.