What Is Flatpak And How To Install Flatpak Apps On Ubuntu And Other Linux

What Is Flatpak And How To Install Flatpak Apps On Ubuntu & Other Linux

Package management is one of the important features of any Linux distro that eases the method of Linux apps installation and maintenance. Different Linux distros follow different methods to package and distribute software.

But the same feature sometimes becomes a stumbling block for some people switching to different Linux distributions. They find it hard to understand the new package manager and fail to install the applications. To resolve such issues with multiple package managers, Linux distro has evolved to produce universal package management systems such as Snap, Appimage, and Flatpak.

Nowadays, if you want to download any application, you must’ve come across the words ‘Flatpak’ or ‘Flathub’. So, did you also find it confusing for the first time? If yes, this article is exactly for you to understand Flatpak with the basic usage of installing and uninstalling Flatpak apps.

After following this beginner’s guide, you will learn about the following things:

  • What is Flatpak and Flathub
  • Enabling or installing Flatpak on Ubuntu, Pop!_OS, Linux Mint, and other Linux distro
  • Installing Flatpak apps using GNOME software
  • Install Flatpak apps from terminal
  • Install Flatpak apps from .flatpakref file
  • Using other Flatpak commands
  • Uninstall Flatpak apps

What Is Flatpak?

Flatpak is a universal package management system to build and distribute applications on any Linux distros. You don’t need to learn distro-specific package managers to install the Flatpak app. It provides a single command-line utility for all Linux distros to download, install and update the app.

Flatpak app comes in bundled with all dependent libraries inside the app. Hence, you also don’t need to install any dependencies externally on your Linux desktop. Here I’m listing key unique features of Flatpak that give several reasons to use it.

Features of Flatpak:

  • Sandboxing environment for running apps
  • Support for 24 Linux distros
  • Running multiple version of the same app at the same time
  • No dependency incompatibilities
  • Automatic application update in the background

What Is Flathub?

Flathub is a centralized flatpak application repository that offers tons of apps and games for the Linux system. It also provides a building service for developers who want to build, distribute, and provide regular updates to apps.

You can also integrate Flathub with your software center from where you browse and install Flatpak applications using a graphical interface. If you live in your terminal, you can use the command line Flatpak utility to browse and install apps from Flathub repo.

So, let’s jump into the first step by setting up Flatpak on the Ubuntu and other Linux distros.

How To Enable Flatpak Support?

If you’re using Fedora, Endless OS, Linux Mint, CentOS, elementary OS, you can skip this step as you don’t need to install Flatpak. The most recent version of these Linux distros comes with a pre-installed and default Flatpak support.

Now to enable Flatpak on other Linux distributions, we just have to run a single command that will install Flatpak and autoconfigure with the Linux system.

Install Flatpak on Debian, Pop!_OS, Ubuntu and its derivatives

sudo apt install flatpak
Install Flatpak On Ubuntu 20.04
Install Flatpak On Ubuntu 20.04

Install Flatpak on the older version of Ubuntu before 18.10

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

Install Flatpak on Red Hat Enterprise Linux (RHEL)

sudo yum install flatpak

Install Flatpak on Arch Linux

sudo pacman -S flatpak

Install Flatpak on OpenSUSE

sudo zypper install flatpak

Install Flatpak on Solus

sudo eopkg install flatpak xdg-desktop-portal-gtk

For all other Linux distributions, you can check here.

Once you finish installing Flatpak, restart your system and we’re ready to hop on the next step of installing Flatpak applications. But before we go ahead, let me inform you that below I will discuss three methods to download and install Flatpak apps from Flathub repo.

  • Installing Flatpak apps using GNOME software center
  • Installing Flatpak apps using .flatpakref file
  • Installing Flatpak app using command line

So, you’re all free to use any of the three methods according to your own situation, desire, and comfort level. Here, I also want to mention that I’m using Ubuntu 20.04 Linux to display the Flatpak app installation.

How To Install Flatpak Apps Using Graphical GNOME Software Center?

1. Install Flatpak Plugin

The graphical method is the easiest way to install Flaptak apps for all those who are afraid of the terminal. To use the default software center, you first need to enable Flatpak support.

Hence, if you’re using the GNOME desktop environment, install the Flatpak plugin by running the command:

sudo apt install gnome-software-plugin-flatpak

For KDE desktop, run the command:

sudo apt install plasma-discover-backend-flatpak
Install gnome-software-plugin-flatpak
Install gnome-software-plugin-flatpak on Ubuntu 20.04

2. Search For App With Source Label To Flathub

Now just search for the app in your default software center, and you’ll notice a label with a source pointing to Flathub repository.

Flatpak app in GNOME software center with source label to Flathub
Flatpak app in GNOME software center with source label to Flathub

Click on “Install” and you can now have a Flatpak app installed on your system.

How To Install Flatpak Apps Using .flatpakref (Flatpak) file?

1. Search For App At the Online Flathub Platform

Go to the online Flathub app store and search for your desired app.

Searching for Flatpak app in Flathub
Search for Flatpak app on Flathub

2. Download The .flatpakref Flatpak file

Click on “Install” and it’ll download torrent like flatpak file .flatpakref which we’ll use in the next step to install the app.

Downloading Flatpak app file
Download the Flatpak app file

3. Install Flatpak App From .flatpakref file

Now, run the following command to install the app using the .flatpakref file.

flatpak install --from /path/to/<app-id>.flatpakref
Install Flatpak app using flatpakref file
Install Flatpak app using flatpakref file

Once you finish installing the app, you can either search in your system or run the following command to open the app:

flatpak run <app-id>

How To Install Flatpak Apps Using Command-Line?

1. Install Flathub Repository

To install a Flatpak app from the terminal, we first need to install Flathub repository so that we can search for the app and then install it.

So, run the command to add Flathub containing the full list of Flatpak app:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Add Flathub repository
Add Flathub repository

2. Search Flatpak App From Terminal

We can now search for any using a single command:

flatpak search <app-name>
Search for Flatpak app
Search for Flatpak app

It will list all apps related to the app-name keyword you entered.

3. Install Flatpak App Using App ID

Spot the app you want to install, copy its application ID, and pass it as input to the following command to install the app:

flatpak install flathub <app-id>
Install Flatpak app
Install the Flatpak app

Now run the application using the command:

flatpak run <app-id>

Using Other Flatpak commands

If you want to do more with flatpak, you can check all its commands available by reading the manual page:

man flatpak
Flatpak utlity commands
Flatpak utility commands

As you can see, there are several commands for managing the installed applications. One of them is the flatpak list that displays all installed Flaptak apps on your system.

flatpak list
List all Flatpak app installed on Linux system
List all Flatpak app installed on Linux system

To update the specific app, you can run:

flatpak update <app-id>

How To Uninstall Flatpak Apps?

Lastly, if you want to remove Flatpak apps, you can do the same using both graphical and command-line methods.

If you’re using a command line, just run flatpak list and grab app-id. Then, run the command to uninstall app:

 flatpak uninstall <app-id>

Using a graphical method, you can search for your installed app in your respective software center and then just click on remove or uninstall.


I hope you enjoyed the beginner’s guide and learned about the Flatpak package management system. Feel free to express your opinion or ask any doubt in the comments section below.

Similar Posts