How to Install FlatPak on Ubuntu

How to Install FlatPak on Ubuntu
A photograph of a laptop on top of a wooden table.

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.

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.

A screenshot showing a Flatpak version of the GNOME Boxes app.

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.

Installing Flatpak on 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:

Run the following command to import the Flathub repository to your Flatpak install:

Restart your machine to apply your new Flatpak settings:

Confirm that the Flatpak manager is working properly by checking its version number:

A terminal showing the version of the latest Flatpak manager binary.

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:

A terminal showing the search output for the Spotify Flatpak app.

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.”

A terminal showing the details of the Spotify Flatpak app.

To list all available installable packages from a Flatpak repository, do the following:

A terminal showing all the available Flatpaks from the Flathub repository.

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:

A terminal showing the installation prompt for Flatpak apps.

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:

The --reinstall flag allows you to force a reinstallation of an existing app in your system:

A terminal showing the force reinstallation process for a Flatpak package.

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:

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:

A terminal showing the output of the update subcommand for a fully updated system.

This subcommand also accepts additional flags which can change its default behavior. For example, the -u flag will only update “user-specific” Flatpak packages:

Removing Packages in Flatpak

To remove a Flatpak package, run the uninstall subcommand followed by the name of your application:

A terminal showing the output of the uninstallation prompt for a Flatpak package.

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:

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:

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.

A screenshot showing the Flatpak version of GIMP running on Ubuntu.

To install GIMP using Flatpak, run the following command:

Confirm that GIMP is running properly on your system by opening it on your desktop:

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.

A screenshot showing the Flatpak version of Pitivi running on Ubuntu.

You can install and run Pitivi on your Linux machine by running the following commands:

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.

A screenshot of the Flatpak version of Telegram running on Ubuntu.

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:

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.

A screenshot showing the Flatpak version of LibreOffice running on Ubuntu.

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:

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.

A screenshot of the Warehouse Flatpak Management program running on Ubuntu.

To install and use Warehouse on your machine, run the following commands on a new terminal session:

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.

Deixe um comentário

O seu endereço de email não será publicado. Campos obrigatórios marcados com *