Follow the guide to learn the commands to know how to install and enable Flatpak on Debian 12 Bookworm or 11 Bullseye for getting various open-source applications that are not available through the official repository of these Linux.
Flatpak is a software distribution framework and a quite good alternative to Ubuntu’s Snap for installing the same application package on different Linux distros. It will work on any Linux OS regardless of what it is based on. That’s why we also called Flatpak – a universal packaging format. It aims to solve the problem of software fragmentation on Linux. Hence reduces the work of developers by allowing them to create applications with the ability to run on various Linux distributions without the need to be distribution-specific packages.
So, if you are a Debian user then apart from APT package manager to install Debian packages of applications you can try Flatpak. Because it reduces the compatibility errors or problems that occur if we install some latest or old software.
1. Update the Debian Package list
Open your command terminal from the list of applications and then run the system update command to refresh the APT package index cache and update packages as well.
sudo apt update
2. Install Flatpak on Debian 12 or 11
Well, by default Flatpak will not be there on Debian 12 or 11, so to use it first we have to install the same. However, the best thing is the package to configure it is available through the default system repository of Debian Linux. Hence, use the APT package manager and run the given syntax.
sudo apt install flatpak
Those who want to install Flatpak using the Debian Gnome Software application can add a Flatpak plugin support for it as well using the given command:
sudo apt install gnome-software-plugin-flatpak
3. Integrate FlatHub Repo
We have Flatpak installed but it needs a source to download and install the packages requested by the user. And for that, Flathub is created. So, use the given Flatpak command to add the Flathub repository to your Debian 12 system.
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Provide your system password, when it is asked for.
4. Restart Debian 12
Next, to integrate the Flatpak properly and apply the changes, restart your system once. Either use the graphical interface or just run the given command in the terminal.
5. Install some Flatpak App – CLI or GUI
Now, we can install any popular application using the Flatpak command line or using the default Debian Gnome Software manager, if you have installed the Flatpak plugin.
Let’s take an example, you want to install Slack on Debian 12 using Flatpak. Then:
On Terminal you can use the given command. Those who want to find the commands for other Flatpak programs can visit its official website:
flatpak install flathub com.slack.Slack
Whereas, the best and easy way to install Flatpak apps is to use the system’s default Gnome Software Applications. On your Debian 12, go to Applications and search Software.
After that use the Search icon and find the software which is available to install from Flatpak’s Flathub repository, for example – Slack.
Removal of Flatpak, if not needed is quite simple. Just use the apt package manager in a similar you had installed it.
sudo apt autoremove --purge flatpak