Install and Use Flatpak on Ubuntu 20.04 - Step by Step Process ?

Flatpak is a universal system package, used for application virtualization, deployment, and mainly used for package management that almost works on all Linux environments.  

This application comes bundled with all other packages dependencies and libraries. 

Flatpak has an important feature, all applications work in a sandbox or work in an isolated environment. Therefore, various versions of an application can run on a single system.

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform Ubuntu Linux Software Installation task.

In this context, we shall look into the complete procedure of the installation of Flatpak on the Ubuntu 20.04 system through the command line.

How to install Flatpak on Ubuntu 20.04 system ?

Generally, You can install Flatpak on Ubuntu 20.04 system in two different methods:

1. Install Flatpak from the official Ubuntu repository

2. Install Flatpak using the PPA Alexander Larsson repository. (The PPA repository gets you the latest Flatpak version on the Ubuntu system).

Now let's deal with these Installation methods briefly.

Method 1. Install Flatpak from Official Ubuntu Repository

Flatpak can be installed easily from the Ubuntu official repository by using the apt package manager. 

i. So, open the terminal application through the application search bar or press 'Ctrl + Alt + t' to open the command line window.

ii. Now, update the system apt packages by using the below-mentioned command:

$ sudo apt update

The above command updates all packages, it helps you to install the latest version of an application on your system. 

iii. However, execute the following terminal command as the root user to install Flatpak on Ubuntu 20.04 system:

$ sudo apt install Flatpak

Enter the root password. After that, the installation would start on your system. You will notice the confirmation prompt appears on the terminal window during the Flatpak installation. 

So, press 'Y' and then 'Enter' to confirm the installation process.

iv. Once the Flatpak installation is completed, check the installed version by executing the following command:

$ flatpak –version

Method 2. Install Flatpak using the PPA Alexander Larsson repository

To install the latest version of the Flatpak, add the PPA repository to your system by running the following command:

$ sudo add-apt-repository ppa:alexlarsson/flatpak

Now, update the system packages repository and then, install Flatpak by executing the below-mentioned command:

$ sudo apt update
$ sudo apt install flatpak

Check the installed Flatpak version. You will notice that the latest Flatpak version  is installed on your system:

$ Flatpak –version

How to Install Software by using the Flatpak ?

You can install any application through the Flatpak on your system.  

Follow the below-mentioned step to install software through Flatpak.

1. Add Flathub repository

Add the Flathub repository by running the following terminal command:

$ flatpak remote-add --if-not-exists flathub

Now, update the repository as follows:

$ sudo apt update

2. Search application Through Flatpak

To do this, search the application name by using the following syntax:

$ flatpak search [application_name]

For example, we want to search postman application through flatpak then, the following command use to search postman by using the flatpak software:

$ Flatpak search postman

3. Install application through Flatpak

Install the postman through the Flatpak on your system. To do this, run the below-given command on the terminal:

$ flatpak install flathub [Application_ID]

The command will change into the following form:

$ flatpak install flathub com.getpostman.Postman


$ flatpak install flathub postman

4. Uninstall application through Flatpak

You can also uninstall the application through the flatpak:

$ flatpak uninstall [Application_ID]
$ flatpak uninstall com.getpostman.Postman

How to Uninstall or Remove Flatpak from Ubuntu 20.04 ?

To remove the Flatpak from the Ubuntu system, type the following command:

$ sudo apt remove flatpak

To remove the PPA Alex Larsson repository, run the below-given command on the terminal:

$ sudo rm /etc/apt/sources.list.d/alexlarsson-ubuntu-flatpak-focal.list

[Need help with this package setup on Ubuntu Linux System ? We are available to help you. ]

This article covers the different commands for Flatpak installation on Ubuntu 20.04 system. Here, you will learn how you can install an application through Flatpak software. Also you will see the two different removal processes of Flatpak. 

Flatpak is a universal package system for software deployments, application virtualization, and most importantly package management that works on all Linux distros.

With a Flatpak package, you don’t need to worry about any dependencies and libraries as everything is already bundled within the application itself.

To Install Flatpak through Ubuntu Official Repository:

1. Update your system's repository index through the following command:

$ sudo apt-get update

2. Now you are ready to install Flatpak; you can do so by running the following command as sudo:

$ sudo apt-get install flatpak

3. You can check the version number of the application, and also verify that it is indeed installed on your system, through the following command:

$ flatpak --version

To Install Flatpak on OpenSUSE.

To enable Flatpak on OpenSUSE invoke the command:

$ sudo zypper install flatpak

To Install Flatpak on ArchLinux / Manjaro.

Finally, to enable Flatpak on Arch Linux and its flavors, invoke the command:

$ sudo pacman -S flatpak

How to remove Flatpak from Ubuntu?

This was all you needed to know about Flatpak. If you want, you can remove it through the following commands:

$ sudo apt-get remove flatpak

If you have installed the package from the PPA, you can remove the PPA through the following command:

$ sudo rm /etc/apt/sources.list.d/alexlarsson-ubuntu-flatpak-bionic.list

Related Posts