With the releases of Fedora 32 and Ubuntu 20.04, Linux users have seen a shift in package formatting, whether to their delight or chagrin. Universal package formats like Snap and Flatpak are beginning to gain in popularity, and in my opinion, for good reason. It’s an easy and simple way to get access to a huge variety of software, both free and proprietary, and it’s easier to package for developers.
However, it can be confusing to get going on your Linux system, especially for new users. Here you’ll learn how to use Flatpak on Fedora, though the instructions should work for any system that has Flatpak installed.
Installing Flatpak on Fedora
To get started, you’ll want to make sure Flatpak is installed. To do that, go to the Flatpak Setup page and select the distro you’d like to use to install Flatpak. For this tutorial, I’ll click on Fedora, but you can see that there is a huge volume of distros to choose from.
From here, you should be prompted to simply download the Flatpak repository file for Fedora. This is a little different than some other distros since Flatpak is pre-installed in Fedora.
You can simply click the link for the Flatpak repo file or enter the command below:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
If you choose to download the repository file, simply follow the prompts to install it. At this point, you are all set to use your Fedora system with Flatpaks from the Flathub repository. There are a few ways you can peruse the Flathub repository.
1. Install Flatpaks Through Gnome Software / Discover
Fedora already has the necessary plugins installed, so you can look through your Software store for Flatpaks the same way you look for any other piece of software. This is incredibly convenient for those who like to browse the software store for apps already. It integrates flawlessly, and you would hardly know the app you’ve installed is a Flatpak unless you’re paying attention to the source.
This can be a bit clumsy at times given that it blends in so seamlessly. Software can be lost in a software store so vast, especially when Flatpaks are the minority of packages. But, there is a very easy way to browse only Flatpaks.
2. Install Flatpaks from Flathub.org
By going directly to Flathub’s website, you can browse all of the apps that Flathub has to offer. This is a great way to see just how vast of a software catalogue Flathub has available to you. Additionally, you can browse by application type, very similar to what you would do in a software store on your desktop. If you want games, developer tools, or science applications, they’re all there on Flathub’s website for you to peruse at your leisure.
One great thing about Flatpak’s website is that they make it very easy to install whatever app you find. You can either click “Install” right by the app’s name at the top of the page, or you can scroll down a little bit and find the terminal command to install it. For example, if I wanted to install Vim here, I could either click “Install” right at the top or enter the command on the page.
flatpak install flathub org.vim.Vim
This leads to the final way that many Linux users prefer to search Flathub and install Flatpaks.
3. Install Flatpaks from the Terminal
Using the terminal to install Flatpaks is one of the more natural-feeling ways to work, at least for myself and many other Linux users. One of the great things about Linux in general is using the command line to install software from remote repositories rather than browsing a website and downloading an executable file or disk image. It’s a powerful and extensible way to install software on your Linux system, and Flatpak supports terminal commands.
The basic syntax is always the same as above. That command was:
flatpak install flathub org.vim.Vim
The first part,
flatpak install flathub, will always be the same unless you’re installing Flatpaks from a different repository than Flathub. The actual name of the Flatpak is where things get confusing. I’m not sure exactly how or why the names of Flatpaks are put in the format they are, but they all start with a Top-Level Domain, or TLD, first. “com.” and “org.” are commonplace. That’s why I recommend using the following command to get the exact name of your Flatpak first rather than trying to remember it.
flatpak search vim
You’ll be able to grab the full name of your Flatpak from there. To also run your Flatpak from the terminal, you can use the command below:
flatpak run org.vim.Vim
Alternatively, you can find the desktop icon in your applications menu and click it to run the application.
There are two primary ways to uninstall Flatpaks on your system. Unlike the installation process, you cannot remove Flatpaks from Flathub’s website. Either go to the Application’s page in your software center and click “Remove,” or you can run the following command, substituting whatever Flatpak you would like to remove:
flatpak remove org.vim.Vim
Find the full name of the installed Flatpak by typing the following command in a terminal.
You now know everything you need to know to get started with Flatpaks on Fedora. These instructions should also work on any other system with Flatpak installed. If your system doesn’t have Flatpak installed, you’ll need to follow the instructions on the setup page linked above. If you’re curious, you can learn about Flathub vs. Snap Store and how to install Spotify on Linux with Flatpaks and Snaps.
Our latest tutorials delivered straight to your inbox