The flatpak command utility is the package manager for Linux distributions. Flatpak enables the Debian 12 users to run the applications in a predictable environment with the most recent preferred stack of libraries.
The flatpak package manager is used to download the packages of various softwares from the official website of Flathub. Then it can be used to manage the packages on 36 different distributions of Linux.
To install the flatpak on Debian 12 specifically, follow the instructions explained in this post and this blog will follow the outline mentioned below:
- What is the flatpak on Debian
- What is the Installation Method of flatpak on Debian
- What is the Usage of flatpak on Debian
- How to Uninstall flatpak on Debian
Let’s start the post by understanding the flatpak command-line utility.
What is the flatpak on Debian?
The flatpak is the command utility used for the management of packages on Linus distributions. It is also used for software deployment and application virtualization.
The important features of using the flatpak command line utility on Debian 12 are:
- The packages of flatpak can be run on different Linux environments regardless of the architecture
- It allows users to bundle the libraries and make them part of your application
- It provides the virtual environment for the testing for the newly developed applications
- The applications created using flatpak can be shared with the Linux community by uploading them on FlatHub
- It provides simple build tools to its users
- All the flatpak applications are hosted from the same centralized repository
After reading all these features, Debian users are wondering about installing it on the new release of Debian. They can install it by following instructions explained in the next section.
What is the Installation Method of flatpak on Debian?
To install the flatpak command utility on Debian 12, run all the commands explained in the below steps.
Step 1: Open the Terminal
First, open the terminal from the application’s menu:
Step 2: Update the Packages
For the installation of the updated version of the flatpak on Debian 12, run the command:
$ sudo apt update
It will update all the packages to their new releases.
Step 3: Install flatpak on Debian 12
Now install the updated version of the flatpak on Debian 12 with the apt command’s “install” option:
$ sudo apt install flatpak -y
The “y” option in the above command is used to allow Debian 12 to proceed with the command.
Step 4: Add the flatpak Repository
Now add the flatpak centralized repository to the Debian 12 with the execution of the command:
$ sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Step 5: Restart the flatpak Service
After adding the repository of flatpak, restart the flatpak service with the command:
$ flatpak --user update
Step 6: Confirm the Installation
To verify the installation of the “flatpak” on Debian 12, display its installed version with the command:
$ flatpak --version
The output confirms that the flatpak command utility has been successfully installed on Debian 12.
What is the Usage of flatpak on Debian?
To use the flatpak on Debian 12, different options are explained below for a better understanding.
Search the Application Using flatpak Command
To search the specific application from the repository of flatpak, use the “search” option. For instance, search the “VLC Media Player” from the repository of flatpak:
$ flatpak search [package name]
The output shows the details of the available VLC media player package in the flatpak repository.
Install the Application Using flatpak Command
Use the “install” option with the application ID to install it using the flatpak command. To install the VLC using the flatpak, run the command:
$ flatpak install flathub org.videolan.VLC
List the Applications Using the flatpak Command
To list down the installed applications from the flatpak utility, run the command:
$ flatpak list
Update the Applications Using the flatpak Command
Run the below-mentioned command to update all the installed applications from flatpak repository on Debian 12:
$ flatpak --user update
Run the Application Using the flatpak Command
To run the application installed from the flatpak repository, use the command:
$ flatpak run org.videolan.VLC
Run Applications in the Sandbox Environment Using the flatpak Command
To run the applications installed from flatpak repository in a Sandbox Environment, run the command:
$ flatpak run --sandbox org.videolan.VLC
The VLC Media Player has been running in a separate sandbox environment.
Rollback the Update
If the installed update is creating trouble in the running of the application then to rollback the application to its previous version, run the command following the below-mentioned syntax:
$ flatpak update --commit=commit-id
Uninstall applications Using the flatpak Command
To uninstall the application using the flatpak, use its “uninstall” option, for instance, to uninstall the “VLC Media Player”, execute the command:
$ flatpak uninstall flathub org.videolan.VLC
The application of VLC Media Player has been uninstalled on the computer using the flatpak command.
Note: To display all the available options of the flatpak command and their usage, run the flatpak command with its “help” option:
$ flatpak --help
This is all about the usage of the flatpak Command on Debian 12.
How to Uninstall the flatpak on Debian?
To remove the installed package of the flatpak on Debian 12, use the “remove” option of the apt command:
$ sudo apt remove flatpak
The better approach is to use the “purge” option of the apt command for uninstalling the flatpak from Debian 12:
$ sudo apt purge flatpak -y
Finally, remove all the unused dependencies of the flatpak package by running the command:
$ sudo apt autoremove -y
This is all about the installation and usage of the flatpak on Debian 12.
To install flatpak on Debian 12, open the terminal and run the “sudo apt install flatpak -y” command. The basic usage of it is also explained in this blog. The flatpak command provides the ease to develop applications and share them with others by uploading them on the FlatHub website. This post has demonstrated the installation and uninstallation of the flatpak on Debian and with the example of “VLC Media Player” the basic usage of the flatpak has been explained.