HomeARCHInstall Flatpak On Debian / Ubuntu / CentOS / Rocky / Arch...

Install Flatpak On Debian / Ubuntu / CentOS / Rocky / Arch Linux / Open SUSE

Today, we will learn how to install and use Flatpak on Debian / Ubuntu / CentOS / Rocky / Arch Linux / Open SUSE. Many people are drifting from the traditional package managers where applications are built for a specific Linux distribution with the introduction of distribution independent package formats. Here, an application is bundled with all the required dependencies to install and run the application within a single package. The packages are not tied to any particular distribution or operating system. The most common distribution-independent package formats include AppImage, Snap, Flatpak etc.

Flatpak is a package manager for Linux systems. It provides a way to package applications with all their dependencies, so that they can be easily installed and run on different Linux distributions, regardless of the underlying system libraries and dependencies. Flatpak is a cross-distribution system, meaning that applications packaged as Flatpaks can run on different Linux distributions, including Debian, Fedora, Ubuntu, and others.

Flatpak is based on a technology called “Linux Containers“, which allows applications to be packaged in a way that they can run on any Linux distribution that supports the Flatpak runtime. Flatpak packages are distributed through a central repository called Flathub, which provides a wide range of applications for users to choose from.

The nifty feature and benefits associated with Flatpak are:

  • Cross-Distribution Support: It is designed to work across almost all Linux distributions. This provides a way to distribute software that can run on any Linux distribution that supports the Flatpak runtime.
  • Application Portability: applications can be distributed as a single package that can be installed and run on multiple Linux distributions, simplifying the process of distributing and installing software.
  • User-Controlled Installation: users can install applications without the need for root access, giving them more control over the software they install on their system.
  • Dependency Isolation: with the sandboxed environment for applications, Flatpak isolates them from the underlying system and ensures that they have access to all the libraries and dependencies they need to run.
  • Stability: a breakage in an application does not lead to system breakage since the applications and their runtime are contained and do not interfere with the system.
  • Security: isolating applications, provides a level of security from the underlying system. This prevents them from accessing resources they shouldn’t have access to, and makes it harder for malicious software to infect the system.
  • Central Repository: It provides a central repository called Flathub, which contains a wide range of applications that users can easily install and run on their Linux-based operating systems.
  • Automatic Updates: It provides a way to automatically update applications, ensuring that users always have the latest version of the software without needing to manually check for updates.

#1. Install Flatpak on Linux Systems

One of the amazing features of Flatpak is cross-platform support. This means that it can be installed on most Linux systems such as Debian, Ubuntu, CentOS, Rocky, Arch Linux and Open SUSE

a. Install Flatpak on Debian / Ubuntu

Flatpak can be installed on Debian/Ubuntu 18.10 and later using the below commands:

sudo apt update
sudo apt install flatpak

For any older versions of Ubuntu, you will need to add the repositories first before proceeding with the installation as shown:

sudo add-apt-repository ppa:flatpak/stable
sudo apt update
sudo apt install flatpak

Once Flatpak has been installed, you will need the Flatpak plugin to be able to install applications without the need for the command line.

sudo apt install gnome-software-plugin-flatpak

b. Install Flatpak on RHEL / CentOS / Rocky Linux

Flatpak can be installed on RHEL, Rocky Linux, CentOS 7 and later using the command:

sudo yum install flatpak

Dependency tree:

Last metadata expiration check: 3:02:11 ago on Tue 04 Apr 2023 10:09:08 EDT.
Package flatpak-1.8.7-1.el8.x86_64 is already installed.
Dependencies resolved.
==============================================================================================
 Package                        Architecture   Version                Repository         Size
==============================================================================================
Upgrading:
 flatpak                        x86_64         1.10.7-1.el8           appstream         1.7 M
 flatpak-selinux                noarch         1.10.7-1.el8           appstream          26 k
 flatpak-session-helper         x86_64         1.10.7-1.el8           appstream          76 k

Transaction Summary
==============================================================================================
Upgrade  3 Packages

Total download size: 1.8 M
Is this ok [y/N]: y

c. Install Flatpak on Arch Linux / Manjaro

On Arch Linux/Manjaro, installing Flatpak can be done using the commands:

sudo pacman -Syy
sudo pacman -S flatpak

d. Install Flatpak on openSUSE

Flatpak is also available in the default OpenSUSE repositories maintained by the OpenSUSE Tumbleweed and Leap versions.

To install it, use the command:

sudo zypper install flatpak

#2. Reboot Your Linux System

Once Flatpak has been installed on your Linux system, it is important to reboot your system.

sudo reboot -i

Once the system reboots, proceed as shown below.

#3. Use Flatpak to Manage applications on Linux

Now we are set to use Flatpak to install and manage apps on Linux. The Flatpak apps are normally hosted on a repository. The most common repository is FlatHub repository which contains several apps in broad categories such as audio & video, utilities, developer tools, graphics & photography etc.

To be able to install packages, you first need to add a repository. To add the FlatHub repo, use the command:

sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Once a repository has been added, verify with the command:

$ flatpak remotes
Name    Options
flathub system

The output shows that the Flathub repo has been added successfully.

a. Install Flatpak Packages on Linux

Now after adding a repository, you can install packages from it. To search for an application, use:

sudo flatpak search app-name

Replace the app-name accordingly. For example:

sudo flatpak search google chrome

Sample Output:

Install Flatpak On Debian / Ubuntu / CentOS / Rocky / Arch Linux / Open SUSE

From the above output, we need the repo and application ID to be able to install it. The command to install a package bears the below syntax:

sudo flatpak install remotes Application-ID

For example:

sudo flatpak install flathub com.google.Chrome

Sample Output:

Install Flatpak On Debian / Ubuntu / CentOS / Rocky / Arch Linux / Open SUSE

b. Run Flatpak Applications on Linux

Flatpak application can be launched from the App menu or via the command line with the command:

flatpak run Application-ID

For example:

flatpak run com.google.Chrome

Sample Output:

c. How to Update/Uninstall Flatpak applications on Linux

To view all the installed Flatpak applications, use:

$ flatpak list
Name              Application ID                   Version          Branch      Installation
Google Chrome     com.google.Chrome                111.0.5563.146-1 stable      system
Freedesktop Plat… org.freedesktop.Platform         22.08.9          22.08       system
Mesa              …freedesktop.Platform.GL.default 22.3.5           22.08       system
Mesa (Extra)      …freedesktop.Platform.GL.default 22.3.5           22.08-extra system
openh264          …g.freedesktop.Platform.openh264 2.1.0            2.2.0       system

To update applications, use:

$ flatpak update
Looking for updates…
Nothing to do.

To remove any Flatpak application, use a command with the below syntax:

flatpak uninstall Application-ID

For example:

$ sudo flatpak uninstall com.google.Chrome


        ID                      Branch       Op
 1.     com.google.Chrome       stable       r

Proceed with these changes to the system installation? [Y/n]: y

See the packages available on Flathub from the official Flathub page.

Verdict

That marks the end of this guide on how to install and use Flatpak on Debian / Ubuntu / CentOS / Rocky / Arch Linux / Open SUSE. Now you can use install and use distribution independent packages from Flatpak on any Linux distribution. I hope this was of great importance to you.

See more:

Klinsmann Öteyo
Klinsmann Öteyo
Self proclaimed Geek
- Advertisment -

Recent posts

LEAVE A REPLY

Please enter your comment!
Please enter your name here