How to Install and Use Flatpak on Debian 12 – LinuxWays
Flatpak is a universal package manager that provides a convenient way for Debian users to install the applications along with all the necessary libraries into a bundle. It is a great tool for installing packages that are not available in the official repository and can be run on different Linux systems.
The Flatpak works in the sandboxed environment, which contains everything that is needed to run a specific software on the system. It is the best alternative to the Apt package manager as it reduces compatibility errors while installing the packages on the system. The Flatpak is used to manage applications and software deployment.
In this guide, we will discuss the installation, configuration, and use of Flatpak on Debian 12.
Quick Outline
How to Install Flatpak on Debian 12
The Flatpak is not available by default on your Debian system; you have to install it through the official repository of your system by following the step-by-step guidelines written below:
Step 1: Update the Package List
First, update the packages using the below-mentioned command to avoid any conflicts during the process of installation:
sudo apt update && sudo apt upgrade
The above command will update and upgrade any outdated packages on your system.
Step 2: Install Flatpak on Debian 12
Next, execute the following command to install Flatpak on your system using the official apt repository:
Optional: To use Flatpak with the Debian GNOME software, you can add the Flatpak plugin support through the below-given command:
sudo apt install gnome-software-plugin-flatpak
This plugin will make it easy for you to install any package on your system through the Gnome GUI tool without using the terminal.
Step 3: Verify the Installation of Flatpak
To verify the installation, check the version of the Flatpak on Debian using the below-given command:
Step 4: Add Flathub Repository
To install the packages, Flatpak needs a source known as Flathub. You have to add the Flathub repository in the Flatpak configuration on your Debian system through the following command to make it available for the installation of applications:
flatpak remote-add –if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Run the following command to verify that the repository has been added to Debian:
Step 5: Restart Your System
It is recommended to restart your device to ensure that the changes are successfully applied, you can do this using the command below:
Step 6: View Flatpak Options
Once you have installed and enabled the Flathub on your system, you can use various options to enhance the user experience and power up your system. To view the options that can be used with flatpak command, open the manual page or run the following command on your terminal:
How to Install Applications Using Flatpak on Debian 12
There are two ways to install the packages on Debian using Flatpak:
1: Install Applications on Debian 12 Using Flatpak Through Terminal
To install an application on Debian 12 using Flatpak, you will need an Application ID of the desired software. To get the ID, you can run the command in the terminal or visit the official website of Flatpak.
Step 1: Search for the Application
The following is the basic syntax to get the ID through the terminal. Replace the application_name with the name of the software you want to install on your system to get its ID:
flatpak search –columns=application <application_name>
Example: In the below command I am searching Google Chrome, it will display the list of matching applications with their application ID:
flatpak search –columns=application google chrome
Step 2: Install the Application Using Flatpak
Once you get the ID of your desired app, you can easily install it on your system through Flatpak. To install the application through Flatpak, the following is the basic syntax:
sudo flatpak install flathub [application_id]
The above command will install the selected package on your system.
Example: Here, I have installed Google Chrome using its application ID on Debian:
sudo flatpak install flathub com.google.Chrome -y
2: Install Applications on Debian 12 Using Flatpak Through GNOME Software
Another way to install the application on Debian 12 through Flatpak is by using the GNOME Software.
Follow the below steps to install the application:
Step 1: Navigate to Activities and search for Software:
Step 2: Find the software you want to install using the Flathub repository and install it:
How to Run Applications Using Flatpak on Debian 12
You can run the installed applications on Debian 12 using the application ID. The fundamental syntax to run the application is mentioned below:
flatpak run [application_id]
Example: To run Google Chrome on Debian 12 using Flatpak, execute the following command:
flatpak run com.google.Chrome
How to List Installed Flatpak Packages on Debian 12
To view the list of all Flatpak packages along with their description such as ID and version, execute the below-given command:
How to Update a Flatpak on Debian 12
To update all the installed Flatpak packages on your system, run the following command:
To update a specific application on Flatpak, run the following command:
flatpak update <application_id>
Example: I have updated Google Chrome on Flatpak using the following command:
flatpak update com.google.Chrome
How to View Details of a Flatpak Application on Debian 12
To view a detail of a specific Flatpak package on Debian, use the info option and application ID with the Flatpak command. For example, I want to view the information of the Google Chrome application on my Debian system:
flatpak info com.google.Chrome
How to Repair Flatpak on Debian 12
If you face any issue while using Flatpak on your system, you can run the repair command:
How to Uninstall a Flatpak Package on Debian 12
The following is the fundamental command to remove any installed Flatpak package from your system:
flatpak uninstall [application_id]
Replace the [application_id] with the ID of the software you want to remove. For example, I am uninstalling Google Chrome from my system:
flatpak uninstall com.google.Chrome
How to Uninstall Flatpak on Debian 12
If Flatpak is not needed, you can remove it through the below-given command:
The better approach is to use the autoremove and purge to delete all the unused dependencies and configuration files along with the package:
sudo apt autoremove –purge flatpak
Conclusion
Flatpak is a command-line utility for managing packages on Linux systems including Debian 12. It is used to download numerous applications from the official website of Flathub. The Flatpak is an efficient way to install and manage applications, as it provides you the freedom to install any available application using its ID. In this guide, we have discussed the steps to install and enable Flatpak on your system. We have also discussed the commands to install packages and manage packages through Flatpak on Debian 12 in the above section of this post.
Hi there! I am a Bioinformatician and a technical content writer. My passion for Linux motivates me to explore various dimensions of Linux OS and write for Linuxways. By combining my skills and IT knowledge, I craft user-friendly and engaging content that helps others to understand complex topics.