Will Flatpak become the new sliced bread?

Give it a try - you've got nothing to lose and everything to gain.

by Pete
Published: Updated: 6 minutes read

Flatpak is a modern package distribution system for Linux that was first introduced in 2016. It was created by Alex Larsson, a software engineer at Red Hat, and was originally known as “xdg-app”.

Since its introduction, Flatpak has gained popularity among developers and users who are looking for a more portable and flexible approach to distributing software on Linux. It is now supported by a growing number of Linux distributions, and is widely used by organizations and individuals alike.

In this article we’ll step through what Flakpak is, what it’s trying to be and will it make it as the default package manager.

What is Flatpak anyway?

Flatpak was designed to address the problem of software fragmentation on Linux, where different distributions and versions of the same distribution can have different dependencies and libraries, making it difficult to distribute software that works across all systems.

Flatpak provides a unified system for installing and managing applications across different Linux distributions, using sandboxing to isolate applications and their dependencies from the rest of the system. It is based on the OSTree format, which allows for efficient distribution of application updates.

Flatpak represents a significant step forward in the evolution of package management on Linux, providing a modern and user-friendly interface for installing and managing applications, with features like automatic updates and app permissions.

How does it work?

Instead of installing applications directly onto the system, Flatpak uses a technology called “sandboxing” to install and run applications in a separate, isolated environment.

When installing a Flatpak application, the application is installed in a separate, sandboxed environment from the rest of the system. This means that the application’s access to system files and resources is limited, enhancing security and minimizing the possibility of conflicts with other applications.

Flatpak applications are installed in the sandbox as “bundles” that contain all the necessary files and dependencies to run the application. These bundles can be downloaded from a centralized repository, such as Flathub, and installed using either the Flatpak command-line interface or graphical tools.

When launching a Flatpak application, it runs inside its own sandboxed environment that includes its own copy of required libraries and dependencies. This allows the application to run independently of other applications on the system, and any changes made by the application are restricted to the sandboxed environment.

How does it compare against APT and YUM?

APT and YUM have been around for years, (1998 and 2003 respectively) and are the grand masters of package mangers. However, there’s always room for improvement. Here’s our comparison of the two with Flatpak.

FunctionalityModern package distribution systemTraditional package managerTraditional package manager
PortabilityPortable across different Linux distributionsSpecific to a particular distributionSpecific to a particular distribution
Dependency managementUses a runtime environment that includes all dependenciesInstalls packages and dependencies from a centralized repositoryInstalls packages and dependencies from a centralized repository
SandboxingUses sandboxing to isolate applications and dependenciesNo built-in sandboxingNo built-in sandboxing
User experienceUser-friendly interface with features like automatic updates and app permissionsCommand-line tool that requires some knowledge of Linux commandsCommand-line tool that requires some knowledge of Linux commands

How can I get started with Flatpak?

To get started with Flatpak, you’ll need to do the following:

  1. Check if Flatpak is already installed on your system: Some Linux distributions come with Flatpak pre-installed, so you may already have it on your system. You can check if Flatpak is installed by opening a terminal and typing the command flatpak --version. If you see a version number displayed, then Flatpak is already installed.
  2. Install Flatpak if it’s not already installed: If you don’t have Flatpak installed, you can install it by following the instructions on the Flatpak website for your specific Linux distribution. Alternatively, you can install it using your distribution’s package manager.
  3. Install the Flatpak runtime: Before you can use Flatpak to install applications, you’ll need to install the Flatpak runtime. You can do this by opening a terminal and typing the command flatpak install flathub org.freedesktop.Platform//VERSION, where VERSION is the version number of the runtime you want to install (you can find the latest version number on the Flatpak website).
  4. Install Flatpak applications: Once you have the Flatpak runtime installed, you can use the Flatpak command-line interface or graphical tools like GNOME Software or KDE Discover to search for and install Flatpak applications. To install an application from the command line, type the command flatpak install APPNAME. You can replace APPNAME with the name of the application you want to install (you can find a list of available applications on the Flatpak website).
  5. Run Flatpak applications: Once an application is installed, you can run it from the command line by typing flatpak run APPNAME, or from your system’s application launcher.

In Summary

Flatpak offers a significant advantage in that it simplifies the installation and management of applications from a central repository, such as Flathub, without the concern of compatibility issues with a user’s Linux distribution. This is particularly beneficial for users who frequently switch between different Linux distributions or who seek immediate access to the latest version of an application.

Although Flatpak has numerous benefits, it is not as widely used as traditional package managers like apt and yum. Nevertheless, this trend may change in the future, as major Linux distributions such as Fedora and Debian have incorporated Flatpak support in their package managers.

Give it a try – you’ve got nothing to lose and everything to gain.