For many years, people have talked about “universal installers” for Linux. We have AppImage, Snap packages, and Flatpaks. Much like the other tools, Flatpak is a technology that makes it easy to install software no matter the Linux distribution. Here, we show you how to install the Flatpak manager on Ubuntu and guide you through the process of installing a Flatpak app.
Content
- Why Use Flatpaks to Install Software
- Installing Flatpak on Ubuntu
- Searching and Listing Packages in Flatpak
- Installing Packages using Flatpak
- Updating Flatpak Packages
- Removing Packages in Flatpak
- 5 Great Flatpaks to Check Out
Why Use Flatpaks to Install Software
One of the biggest selling points of Flatpak is that it provides a complete desktop-focused containerized app platform. This can’t be said for Snap, as Canonical tends to focus more on server software. With Flatpak’s focus, it is easy to see tons of software from many developers popping up in a very short time.
Aside from that, Flatpak is also being developed by people who are deeply familiar with the GNOME desktop environment. As a result, you can find a variety of popular GNOME-based utilities such as Boxes, Cheese, and Glade.
Lastly, Flatpak strikes the balance between modularity and ease of use. Unlike Snap and AppImage, it’s easy to create and include third-party repositories for custom Flatpak packages. This makes it simple to create your own pipeline for your own apps without relying on a third-party service.
Tip: learn how you can customize your GNOME desktop with some of the best GNOME shell extensions today.
Installing Flatpak on Ubuntu
Note: all Flatpak package installation instructions apply to all Linux-based operating systems, including Ubuntu.
At the moment, Flatpak is available on the default Ubuntu repositories for both LTS and Current branches. As such, installing the software manager is as simple as running a single apt
command:
sudo apt install flatpak gnome-software-plugin-flatpak
Run the following command to import the Flathub repository to your Flatpak install:
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
Restart your machine to apply your new Flatpak settings:
sudo reboot
Confirm that the Flatpak manager is working properly by checking its version number:
flatpak --version
Searching and Listing Packages in Flatpak
To search for a particular package, run the search
subcommand. This will look at all the available remote repositories in your system and return all the packages that match your query:
sudo flatpak search spotify
You can also look at the details of a particular package through the info
subcommand. However, it’s important to note that this will only work on currently installed apps and that it requires you to provide that app’s “Application ID.”
flatpak info -m com.spotify.Client
To list all available installable packages from a Flatpak repository, do the following:
flatpak remote-ls flathub --app
Installing Packages using Flatpak
To install a Flatpak package on Ubuntu Linux, run the install
subcommand followed by the name of the repository and the app that you want:
sudo flatpak install flathub spotify
Note: you can provide the Application ID instead of its shorthand name when installing an app. For instance, the command sudo flatpak install com.spotify.Client
will fetch the same Spotify client to your machine.
The install
subcommand also takes in a number of additional flags which can customize how you install your app to your system. For instance, the -u
flag allows you to create “user-specific” installs of your app:
flatpak install -u flathub com.spotify.Client
The --reinstall
flag allows you to force a reinstallation of an existing app in your system:
sudo flatpak install --reinstall flathub com.spotify.Client
You can also tell Flatpak to only download the package files for a particular app. This can be useful if you’re holding off on an update but want to ensure that the files are already in the machine:
sudo flatpak install --no-deploy flathub com.spotify.Client
Good to know: learn how to fix broken packages on popular Linux distros.
Updating Flatpak Packages
Just like with traditional package managers, Flatpak can update existing apps in your system. To do that for every Flatpak package on your machine, run the update
subcommand:
sudo flatpak update
This subcommand also accepts additional flags which can change its default behavior. For example, the -u
flag will only update “user-specific” Flatpak packages:
flatpak update -u com.spotify.Client
Removing Packages in Flatpak
To remove a Flatpak package, run the uninstall subcommand followed by the name of your application:
sudo flatpak uninstall spotify
The subcommand can also remove any currently existing data for your application. To do that, run the uninstall subcommand followed by the --delete-data
flag then your Flatpak package:
sudo flatpak uninstall --delete-data spotify
Lastly, it’s also possible to wipe any unused dependencies from your Flatpak packages. This is useful if you’re looking to manage the space that Flatpak is taking on your computer:
sudo flatpak uninstall --unused
5 Great Flatpaks to Check Out
1. GIMP
GIMP is a powerful graphics editing tool that’s available for Linux, Mac, and Windows. While you can install this impressive program as a standalone app, its Flatpack alternative provides you with the latest features from the developers themselves.
To install GIMP using Flatpak, run the following command:
sudo flatpak install flathub org.gimp.GIMP
Confirm that GIMP is running properly on your system by opening it on your desktop:
flatpak run org.gimp.GIMP
2. Pitivi
There are many video-editing apps on Linux. When searching through package repositories, users will likely come up with at least 3 or more options. Pitivi is no different. It’s an advanced video editor with tons of great features and an easy-to-use user interface. And like most software on this list, it benefits from fast updates – something only a Flatpak can provide.
You can install and run Pitivi on your Linux machine by running the following commands:
sudo flatpak install flathub org.pitivi.Pitivi flatpak run org.pitivi.Pitivi
3. Telegram
Telegram is a great message app and one of the few mainstream services to take Linux seriously as a platform. Downloading Telegram and getting it running on Linux is moderately easy but something not a lot of people want to do as it requires extracting packages.
Luckily, there’s now an official Flatpak package for that. This means it’ll always have up-to-date binaries, and installing Telegram on new machines can be just a few commands away:
sudo flatpak install flathub org.telegram.desktop flatpak run org.telegram.desktop
4. LibreOffice
LibreOffice, like GIMP, gets updated with new features quite often. A lot of the time, most Linux distro maintainers are slow to push out these changes. That’s why The Document Foundation took it upon themselves to distribute their software via Flatpak.
This approach ensures that you can get the latest version of the LibreOffice suite as soon as possible without hassle. To install and run Libreoffice as a Flatpak, run the following commands:
sudo flatpak install flathub org.libreoffice.LibreOffice flatpak run org.libreoffice.LibreOffice
5. Warehouse
Managing Flatpak packages can be a handful ordeal if you’re not used to typing commands on the Linux terminal. Warehouse is a lightweight and easy to use Flatpak management utility for Linux. It can list all the available Flatpak-based programs, manage remote repositories, and even remove unused data from older packages.
To install and use Warehouse on your machine, run the following commands on a new terminal session:
sudo flatpak install flathub io.github.flattool.Warehouse flatpak run io.github.flattool.Warehouse
Learning how to install, use, and run Flatpak apps are just some of the things that you can do on Ubuntu Linux. Explore this deep and diverse world of Free and Open Source software by looking at some of the best programs for your Linux system today.
Image credit: Kari Shea via Unsplash and Wikimedia Commons. All alterations and screenshots by Ramces Red.
Ramces Red –
Staff Writer
Ramces is a technology writer that lived with computers all his life. A prolific reader and a student of Anthropology, he is an eccentric character that writes articles about Linux and anything *nix.
Subscribe to our newsletter!
Our latest tutorials delivered straight to your inbox
Sign up for all newsletters.
By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time. Subscribe