Snap to Flatpak on Ubuntu

Within recent podcasts and magazine articles, I explained my transition from Ubuntu to Pop!_OS. During this time, I stated that one could manually modify Ubuntu to replicate many of the benefits of Pop!_OS, but I did not offer any specific steps. Since then, many diehard Ubuntu users have contacted me requesting explicit details about these statements.

First, there is nothing wrong with Ubuntu. I just don't like some of the latest features. One of these is the use of Snap for the application store, Firefox, and other default apps. In fact, if you try to install some applications with traditional APT commands, Ubuntu modifies your commands and installs the Snap versions. No thanks. I prefer Flatpak as my package manager, which I find to be much cleaner and faster.

The following command will display all installed snap applications:

snap list

This presents the following within a new Ubuntu 22.04 install:

The following command would remove Firefox:

sudo snap remove --purge firefox

I could repeat this process to delete each of the removable entries, including the software store:

sudo snap remove --purge gnome-3-38-2004
sudo snap remove --purge snap-store
sudo snap remove --purge gtk-common-themes

I can now remove the Snap cache with the following:

sudo rm -rf /var/cache/snapd/

Finally, I can remove Snap with the following commands:

sudo apt autoremove --purge snapd gnome-software-plugin-snap -y
rm -fr ~/snap

I prefer to go one step further with the following command, which prevents any attempt to install an application with Snap by default:

sudo apt-mark hold snapd

I am now ready to install Flatpak and the application store with the following commands:

sudo apt install flatpak -y
sudo apt install gnome-software-plugin-flatpak -y
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Restarting my machine presents the Flatpak store: