I met a forum member who was confused by the different formats of Linux applications.
He would have liked something that could determine whether a given application had been installed in .deb, Flatpak or Snap format, so that he would know how to uninstall it.
Rather than going through ‘Software’, I preferred to have fun creating an alias.
- Open the terminal (Ctrl+Alt+T) and enter the following line (copy and paste) to edit or create the alias file:
gedit .bash_aliases
- Then copy and paste this second line at the end of the file that has just opened:
alias wp='_wp() { echo "APT"; apt list --installed "$1" ; echo && echo "FLATPAK"; flatpak list --app | grep -wi "$1"; echo && echo "SNAP"; snap list | grep -wi "$1"; }; _wp'
- Save the changes, then close the editor and the terminal.
Open a new terminal and type ‘wp’ (as in ‘Which Package’), followed by all or part of the application name:
wp brave*
APT
Listing... Done
brave-browser/stable,now 1.84.132 amd64 [installed]
brave-keyring/stable,now 1.19 all [installed, automatic]
FLATPAK
SNAP
error: no matching Snap package installed
wp foliate
APT
Listing... Done
FLATPAK
Foliate com.github.johnfactotum.Foliate 3.3.0 stable system
SNAP
error: no matching Snap package installed
wp ubuntu-budgie-welcome
APT
Listing... Done
FLATPAK
SNAP
Name Version Revision Tracking Publisher Notes
ubuntu-budgie-welcome 0.26.0 564 latest/stable ubuntubudgie classic
Note
- Accepts lowercase as well as uppercase input.
- Flatpak doesn’t accept the wildcard ‘*’.
- APT and Flatpak return nothing, and Snap reports an error if there are no applications in these formats.
Hoping this helps.