This is a beginner’s guide shows how to install a Flatpak app package via local .flatpakref
, an URL link, or a software repository.
Some popular Linux has added Flatpak support out-of-the-box. User can even install Flatpak via system’s default package manager, including Fedora‘s Gnome Software, Linux Mint‘s software manager, and Manjaro‘s Pamac.
However, many other Linux does not support this package format, including the popular Ubuntu and Debian. So, I’m here to write this tutorial and hope it could help.
More tutorials about Flatpak
Why Flatpak
As you may know, Linux has the most popular libraries installed as separated packages. Native app packages can be quite small in file size, because they share these dependency libraries that are already in system.
As a result, a small app can do a great job! However, free open-source world is moving so fast that core system libraries are always outdated. New apps (or versions) need updated libraries, but Linux system has an old version required by other core components. So, it causes problems.
To workaround this issue, Flatpak, Snap, and AppImage packages born! They include the application packages with most run-time libraries bundled, make possible to run apps with new features even on old systems.
The downside is that they require more disk spaces due to bundled run-time libraries. And, they run in sandbox with problem communicating with other system apps. Though, developer are now working on the issue.
As more and more software developers publish Linux package via Flatpak and AppImage, though Ubuntu sticks to Snap. It’s hard to avoid these package formats today in Linux.
Install A Flatpak Package
Usually, we can get a Flatpak package via 3 different ways: download from software website, using direct URL link, or from a software repository (e.g., Flathub).
First of all, search for and open ‘terminal’ from system start menu or ‘Activities’ overview, and continue the steps below
Enable Flatpak support
Ubuntu & Debian does not support this package format out-of-the-box. But, user can simply run the command below to enable it:
sudo apt install flatpak
The old Ubuntu 16.04 and Ubuntu 18.04 can even enable Flatpak support via this PPA.
For other Linux, follow the official setup guide.
Install local .flatpakref (or .flatpak) file
In case you already downloaded a software package with .flatpakref
or .flatpak
file extension. Install it, by running command:
flatpak install /PATH/TO/filename.flatpakref
Users mostly save files in ‘Downloads’ folder, so the command can be: flatpak install ~/Downloads/filename.flatpakref
.
Tip: Drag and drop file into terminal can insert /PATH/TO/FILE automatically.
merilyn@Jammy:~$ flatpak install ~/Downloads/org.gnome.Boxes.flatpakref org.gnome.Boxes permissions: ipc network fallback-x11 pulseaudio wayland x11 devices file access [1] dbus access [2] system dbus access [3] [1] /var/lib/AccountsService/icons:ro, host, xdg-run/dconf, ~/.config/dconf:ro [2] ca.desrt.dconf, org.freedesktop.secrets, org.gnome.ControlCenter [3] org.freedesktop.Accounts, org.freedesktop.timedate1 ID Branch Op Remote Download 1. org.gnome.Boxes.Extension.OsinfoDb stable i flathubThe command will output the permissions the app package required, information about the packages and run-times to install. User has to either type "y" to continue or type "n" to stop it.
Install via an URL
Without downloading the
.flatpakref
file, user may select to copy the download URL into clipboard, and use the command below to install it:flatpak install url-link-to-flatpakrefI like this method, as it leaves my 'Downloads' folder clean.
Install Flatpak from software repository
By adding a software repository, usually Flathub.org, user can simply run the command below to install a package:
flatpak install REPOSITORY_NAME PACKAGE_IDFor example, use
flatpak install flathub org.gnome.Boxes
to install Gnome Boxes.
Most Linux can use the single command below to add Flathub repository:flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
How to List Installed & Remove Flatpak package
To tell all installed Flatpak applications in your system, use command:
flatpak list --appYou may skip the
--app
flag, so it outputs all packages including the run-time libraries installed as dependency:flatpak listTo list runtime separately, use command
flatpak list --runtime
And, to remove a flatpak package, use command:
flatpak uninstall --delete-data app-IDFor example, use
flatpak uninstall --delete-data io.github.seadve.Kooha
to remove Kooha. If you want to keep the personal data files, skip--delete-data
section.Manage Flatpak App Permissions
Default permissions are mostly good. But if you want, it's possible to manager the accessibility of network, file-system, and hardware devices, such as printer, bluetooth, speaker and camera.
That's quite a lot of command options, you may go to the official documentation for details.
For desktop PC/laptop, I'd always recommend Flatseal, a graphical tool to manage Flatpak apps:
User can install the app either by visiting the link above, or run the command below in a terminal window:
flatpak install https://dl.flathub.org/repo/appstream/com.github.tchx84.Flatseal.flatpakrefThat's all. Enjoy!