A beginner’s guide on how to install Flatpak in Ubuntu and other Linux distributions.
Table of Contents
What is Flatpak?
Flatpak is the new way of distributing apps across the Linux universe, irrespective of the distribution. This cross-distro application distribution and deployment framework enable developers to Flatpak setup for apps for all major distributions.
The major hurdles in any Linux app distribution are dependencies, and Flatpak covers that. Flatpak builds bundles the dependencies for the respective apps, and end-users need not worry about it.
With the growing trends, many app developers are now providing the Flatpak builds along with traditional packages, e.g. *.deb, etc. With a quick setup for your distributions, you can be ready to explore the world of Flatpak apps. All the major Flatpak apps are available on flathub.org. You can search and just click a button, you can install the Flatpak apps. Here’s how to set it up for Ubuntu and other Linux distributions.
How to setup Flatpak in Ubuntu
- For Ubuntu 24.04, 23.10 use the following command to install Flatpak:
sudo apt install flatpak
If you are using an older version of Ubuntu, use the following repo.
sudo add-apt-repository ppa:alexlarsson/flatpak sudo apt update sudo apt install flatpak
- The second step is optional if you want to install Flatpak apps via the browser. Enable Ubuntu Software to recognize Flatpak apps and their installations. Run the below commands from the terminal and provide the password when prompted.
sudo apt install gnome-software-plugin-flatpak
- Add the Flathub repository where all the Flatpak apps reside. Run the below commands from the terminal.
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
- Reboot.
Install in Other Linux Distributions
Flatpak is available to install almost all possible distributions. Here’s a quick list of commands you can run from the terminal in all the distros.
Linux distro name | Instructions or commands to set up Flatpak |
AlmaLinux | Enabled by default. No action is required. |
Alpine Linux | Run the following commands:sudo apk add flatpak
|
Arch Linux | Run the following commands:sudo pacman -S flatpak
|
CentOS | Enabled by default. No action is required. |
Clear Linux | Enabled by default. No action is required. |
Debian | Run the following commands:apt install flatpak
|
Deepin OS | Run the following commands:sudo apt install flatpak
|
elementary OS | Enabled by default. No action is required. |
Endeavour OS | Enabled by default. No action is required. |
Endless OS | Enabled by default. No action is required. |
Fedora Linux | Flatpak is installed by default. All you need to do is to install the Flathub repo:flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo And finally, reboot your system before installing the Flatpak app. |
Gentoo | Run the following commands:echo -e 'sys-apps/flatpak ~amd64\nacct-user/flatpak ~amd64\nacct-group/flatpak ~amd64\ndev-util/ostree ~amd64' >> /etc/portage/package.accept_keywords/flatpak
|
KDE Neon | Enabled by default. No action is required. |
Kubuntu | Run the following commands:sudo apt install flatpak
|
Linux Mint | Enabled by default. No action is required. |
Mageia | Run the following commands:dnf install flatpak
|
Manjaro Linux (Arch-based) | Installed by default since Manjaro 20 and higher. Make sure it is enabled in the below navigation: Software Manager > Preferences > Flatpak Tab > Enable Flatpak Support Reboot your system |
MX Linux | Enabled by default. No action is required. |
Nix OS | Open /etc/nixos/configuration.nix and add the following:Services.flatpak.enable = true; And then run the followings: sudo nixos-rebuild switch
|
openSUSE Leap and Tumbleweed | Flatpak is installed by default. All you need to do is to install the Flathub repo:flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo And finally, reboot your system before installing the Flatpak apps. |
Pop OS | Enabled by default. No action is required. |
Raspberry Pi OS | Run the following commands:sudo apt install flatpak
|
Red Hat Enterprise Linux (RHEL) | sudo yum install flatpak
|
Solus | Run the following commands:sudo eopkg install flatpak xdg-desktop-portal-gtk
|
Void Linux | Run the following commands:sudo xbps-install -S flatpak
|
Zorin OS | Enabled by default. No action is required. |
Once installation is completed, and reboot is done, you can install some cool Flatpak apps via the below steps.
How to Install Flatpak Apps in Ubuntu and Other Linux
There are two ways you can install Flatpak apps. Firstly via the command line, which I recommend. And second is the browser method.
I recommend using the command line because it is faster and easier.
Using the command line (recommended)
The sample command to install any Flatpak app is available at the bottom section of the Flathub app page. A sample command is below:
flatpak install org.gimp.GIMP
Change the above “org.gimp.GIMP” for your application. Remember, this is case-sensitive.
Using the graphical method via browser
- Go to Flathub.
- Search for any apps you want to install.
- Click install after selecting your desired app.
- Click Ok when it prompts you to start the installation via Software.
- The Software will open and wait till the installation finishes.
How to update Flatpak after you install them?
Updating Flatpak is super easy via the terminal. For example, if you want to update the above GIMP package, you need to run the below command.
flatpak update org.gimp.GIMP
So, this will update a single package. Replace your package’s name (i.e. Application ID) for your use case. If you don’t know the Application ID, run the command flatpak list
from the terminal, and you will find it.
If you want to update ALL the Flatpak packages in your system, run the following:
flatpak update
How to uninstall a Flatpak?
You can uninstall a package using the following command. Make sure to change the Application ID for your use case. You can find out the Application ID from the command: flatpak list
.
flatpak remove org.gimp.GIMP
Closing Notes
In this tutorial, I have explained how you can easily set up Flatpak and install apps from Flathub. Moreover, Flatpak applications are a great way to install and manage them easily. In my opinion, Flatpak will eventually dominate Snap and AppImage in the future.
You may want to check out our other articles about Flatpak, which include how to manage permission, various Flatpak commands and more.