How to install flatpak

In this guide we prove you how to install Flatpak on Ubuntu to unlock a world of new and updated software available from Flathub.

Ubuntu lets you install Snap apps and regular repo software out of the box. No set-up required. But if you desire to install Flatpak apps on Ubuntu you need to install a couple of things yourself.

An omg! reader asked if I could put together a pace-by-step guide to show them how to install Flatpak on Ubuntu 18.04 LTS and 20.04, also as how to set up the Flathub repo, and how to install Flatpak apps from Flathub on Ubuntu — then I figured I would!

The proficient news is that the whole process is pretty easy.

Why Use Flatpak?

the spotify linux app flatpak running on ubuntu
Spotify is available as a Flatpak app

Flatpak is a 'next-generation' Linux app format developed by Carmine Lid and used in Fedora, amid other many other Linux distros.

It's similar to Snap apps in many ways: apps are sandboxed; come up bundled up with everything they need to run; and back up automatic groundwork updates.

As these new app package technologies let Linux users install apps regardless of which distro or bundle manager they utilise, more developers are choosing to distribute their software using using them.

Thanks to OSTree, Flatpak enables developers to create a complete app package that contains all of the dependencies, libraries and other files needed to run their program.

'Build once and run everywhere is a strong sell'. Dependencies are the main headache when packaging software for unlike Linux distributions. Flatpak (like Snaps and AppImages) 'solves' this.

Flatpak apps ask for permission earlier they can admission some hardware (e.g., webcam); read or open files outside of their sandbox; utilise location detection technologies like geoclue, and more. You can manage these permissions (i.due east. revoke them) at any point using Ubuntu's Settings app.

In all, Flatpaks gives you far greater command over the software yous run, and developers.

So why employ Flatpak? There are a few key reasons:

  • No dependency incompatibilities
  • More control over what apps can exercise
  • Get app updates sooner
  • Access a wider range of software
  • Get updates direct from app developers

There are plenty of other reasons why you might desire to use this new-fangled app format, so experience complimentary to expand on this in the comments section.

How to Install Flatpak on Ubuntu

The fastest way to install Flatpak on Ubuntu (either 18.04 LTS or 20.04 LTS and in a higher place) is to use the command line.

Oh, don't look at me like that!

Running terminal commands is scary, I go that. Merely there's little to become wrong provided that you follow the instructions every bit written. Plus, because of the style the Ubuntu Software app is at present packaged trying to practice the same task using a GUI is …laborious.

So, to install Flatpak on Ubuntu (and a few other things you'll demand later) pop open a new Last window and run the following command:

sudo apt install flatpak gnome-software-plugin-flatpak gnome-software

Hitting the Enter central and type in your countersign if/when prompted.

You lot'll be asked to confirm the install. You'll detect a couple of actress packages are listed at this signal. These are dependencies that are required, then you can't skip them.

Type Y to allow the installation to keep.

Once complete, you have Flatpak installed on Ubuntu.

How to Add together the Flathub Remote

To actually install Flatpak apps you demand to connect the tool to a repository (called a 'remote' in Flatpak speak).

Flathub is the primarily store for Flatpak apps. More than and more developers are choosing Flatpak and Flathub as their primary distribution method. Like the Snap store, Flathub acts as a centralised repository that whatever user tin use and any app developer can add their apps to.

To add Flathub to Ubuntu and connect information technology to Flatpak run the post-obit command:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

You may be asked to enter your password to authorise the modify.

A blink or two afterwards and there's simply one thing left to do: restart your computer. This helps ensure that all the components lock into place correctly, and things piece of work as expected.

You lot now have everything you need to install Flatpak apps on Ubuntu using the GNOME Software app, the command line, and/or the Flathub website.

How to Install Apps from Flathub

Seeing double

On Ubuntu 18.04 LTS you can search for and install Flatpak apps from the Ubuntu Software customer, merely on Ubuntu 20.04 LTS and in a higher place you'll need to apply the Software app.

To distinguish between them merely look at the icon: if it's a white shopping bag, it'due south Software, if it's orangish it's Ubuntu Software.

When you search for and browse apps in the Software app (whichever y'all apply) you lot may find it difficult to tell which ones are Flatpaks, which apps are Snaps, and which are regular repo software. In 18.04 LTS keep an eye out for the "source: flathub.org" text in Software search results:

Ubuntu Software Flatpak

On Ubuntu xx.04 LTS and above yous'll only be able to tell if an app is a Flatpak when opening the listing page and seeing a 'source' menu in the header bar (first image) or, if not present, scrolling down to the meta-information section to see if Flathub is mentioned in that location (2d image):

You can also browse and install apps from Flathub using your web browser. Justpoint your browser towards the Flathub website to become started. From here you tin can search for and find Flathub based on category (Utility, Games, etc) or search for apps by name (due east.yard., 'GIMP', 'Spotify', etc):

a screenshot of Flathub open in Firefox browser on Ubuntu 20.04 LTS
Flathub has an engaging shop front

When you observe an app you want to install all you have to do is click through to its store listing page and click the "Install" button(1).

a screenshot showing how to download Flathub downloading a .flatpakref file in the Firefox browser on Ubuntu 20.04 LTS

You'll see a dialog asking you lot which app you lot want to open up the .flatpakref file with. Make sure that "Software install (default)" is selected (two) then click OK (3):

This will open up Software app.

Click the install button to — well, I'm sure you can guess!

a screenshot showing the GNOME Software app open and a Flatpak app ready to install
Viewing a Flathub app in Software on Ubuntu 20.04 LTS

That's all there is to it.

Now you lot know how to install and utilize Flatpak apps and Flathub on Ubuntu.

You tin remove Flatpak apps using the Software tool (provided you install the Flatpak plugin), as well equally bank check for updates to Flatpak apps and install those updates.

If you adopt to do this from the command line simply run flatpak refresh to cheque for updates and flatpak update to install the updates.