How to set up and enable Flatpaks on Linux

FLatpaks The Universal Package Manager

Flatpaks are just one of the many solutions offered on the Linux desktop to solve the problem of ‘too many package managers’. However, it is very different from any package manager such as pacman (On Arch Linux), dnf (On Fedora Workstation) or apt in so many ways.

According to the official documentation, It is essentially a system for building, distributing, and running sandboxed desktop applications on the Linux desktop. However, because they are sandboxed, each application ships with its own set of libraries and dependencies they use and thus use a lot of disk space on your system.

In this tutorial, we will take a look at the usage of Flatpaks and also learn to set it up on our installed distribution.

Also read: MangoHud – Monitor system vitals while playing games on Linux.

Enabling Flatpaks (and FlatHub) on distributions

If you are using Debian, Ubuntu, or one of its derivative distributions, then just open a Terminal and type the following command:

sudo apt update && sudo apt install flatpak

# Now, enable FlatHub:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

If you are on Fedora Workstation, then Flatpaks is already installed on your distribution, you just have to add the Flathub repository:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Enabling FlatHub On Fedora
Enabling FlatHub On Fedora

Arch Linux users already have the advantage of AUR, but they still might consider installing Flatpaks as AUR applications do not feature Sandboxed applications, which is the main feature of Flatpaks:

sudo pacman -S flatpak

You may have to restart your PC if you’re on Arch Linux.

Also read: The apt command in Linux – A Complete Reference

Using Flatpaks

If you are not comfortable typing commands in the Terminal, then you can visit the FlatHub website, search, and then copy-paste commands into your Terminal.

You Can Install Flatpaks From FlatHub
You Can Install Flatpaks From FlatHub

However, many Software Stores nowadays integrate with Flatpak really well, and you can find them locally without opening the Terminal or visiting the Website.

Steam Faltpak Version Is Visible In The Software Center
Steam Flatpak Version Is Visible In The Software Center

And if you still prefer the good old command line option to install applications, you can do so by the following methods :

# To Search for any application, you can type:
flatpak search APPLICATION NAME
Searching Flatpaks
Searching Flatpaks

As you can see in the screenshot, Steam’s application ID is com.valvesoftware.steam, to install any application, you can type the following command:

# To Install any application:
flatpak install flathub APPLICATION ID
Installing Heroic Games Launcher With Flatpak
Installing Heroic Games Launcher With Flatpak

If you want to update all the installed Flatpaks, then you can type the following command:

flatpak update

And in order to list all the installed applications, you can view them by typing:

flatpak list --app

Summary

As the Flatpak applications are completely sandboxed, they do not respect the system theming which you have applied and thus look very different from the native applications. However, if you want privacy and universal commands regardless of distribution, then this is the best option you have.

Even the Steam OS uses Flatpak now, and the distribution managers do not have to focus on application updates and focus on improving the Steam Deck Platform.