How to Install Flatpak on Ubuntu Linux

Flatpak delivers universal application distribution across Linux systems through secure sandboxing, similar to how Windows containerizes Microsoft Store apps or macOS isolates App Store downloads. Unlike Ubuntu’s traditional APT (Advanced Package Tool, which combines the role of Windows Update with the Microsoft Store) packages that integrate tightly with system libraries, Flatpak bundles every dependency inside each application so it behaves the same across all Ubuntu releases.

This guide shows how to install Flatpak on Ubuntu from the default repository or the Flatpak Team PPA (Personal Package Archive) when you need newer builds, add the Flathub repository with thousands of applications, and master essential commands from basic installation to advanced permission management. You’ll learn when to choose Flatpak over Ubuntu’s native Snap packages and how to configure system-wide versus user-level installations.

Choose Flatpak or Snap for Ubuntu Apps

Flatpak excels when you need identical builds across multiple Ubuntu releases or want to install software that Snap doesn’t offer. Flatpak bundles libraries and runtimes with each application, so desktop apps such as GIMP, Blender, and LibreOffice behave the same on laptops, desktops, and immutable systems. Snap remains the better default for Canonical-maintained packages like core system tools because it hooks into Ubuntu’s automatic updates, but Flatpak delivers broader community support and easier theming.

Use Flatpak when you frequently share applications across different Ubuntu installs, rely on upstream releases from Flathub, or need more precise permission controls through the sandbox overrides covered later in this guide. Use Snap when Canonical provides an optimized build or when you’re already managing Snap-only tools such as LXD or MicroK8s. With that context, proceed with the installation steps below.

System Update Requirements

Open the terminal (press Ctrl+Alt+T or search for “Terminal” in the activities menu) before running these commands.

Before installing Flatpak, update your system to ensure all existing packages are current:

sudo apt update && sudo apt upgrade

Method 1: Install Flatpak via Default APT Repository

Ubuntu ships Flatpak in its default repository but doesn’t install it by default since Canonical promotes Snap for third-party applications. Installing from Ubuntu’s repository provides stable, well-tested versions suitable for most users.

Next, install Flatpak using APT:

sudo apt install flatpak

After installation completes, add the Flathub repository to access thousands of applications:

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

By default, the command above installs Flathub for your user account only. Add the --system flag to install it for every user on the machine:

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

System-wide installation requires sudo privileges and keeps all users on the same Flatpak application versions during updates.

Method 2: Install Flatpak via Flatpak Team APT PPA

The Flatpak Team Launchpad PPA provides newer stable and development versions not yet available in Ubuntu’s default repositories. Choose the stable PPA for recent features with proven reliability, or select the development PPA when you need cutting-edge fixes for testing environments. Most users should stick with Method 1 or the stable PPA unless actively troubleshooting specific bugs.

Option 1: Import Flatpak stable PPA:

sudo add-apt-repository ppa:flatpak/stable -y

Option 2: Import Flatpak development PPA:

sudo add-apt-repository ppa:flatpak/development -y

After importing your chosen PPA, refresh the package index:

sudo apt update

Then, install Flatpak from the PPA:

sudo apt install flatpak

Next, add the Flathub repository to access applications:

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

If you later need to switch between PPA versions or remove the PPA entirely, refer to our guide on removing a PPA from Ubuntu for proper cleanup procedures.

Finally, verify the installed version to confirm you’re running the PPA release:

flatpak --version

The PPA typically provides versions several releases ahead of Ubuntu’s default repositories, delivering the latest features and security patches as they become available.

Managing Applications with Flatpak Commands

After installing Flatpak and adding repositories, you can manage applications through essential commands covering installation, updates, permissions, and system configuration.

How to Add Flathub and Other Repositories

Flatpak uses remote repositories to distribute applications. To add a repository, use this command structure:

flatpak remote-add --if-not-exists <name> <URL>

To add the Flathub repository (the primary source for Flatpak applications), run:

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

How to Install Flatpak Applications

Once you’ve added repositories, install applications with:

flatpak install <application-name>

Install GIMP:

flatpak install org.gimp.GIMP

How to Update Flatpak Applications

Keep applications current by updating them individually:

flatpak update <application-name>

Update GIMP:

flatpak update org.gimp.GIMP

How to Remove Flatpak Applications

When necessary, uninstall applications you no longer need:

flatpak uninstall <application-name>

Remove GIMP:

flatpak uninstall org.gimp.GIMP

List Installed Applications

List all applications installed through Flatpak:

flatpak list

How to Search for Applications

Before installing, search the repository to find the correct application identifier:

flatpak search <search-term>

Search for LibreOffice:

flatpak search libreoffice

List Configured Remote Repositories

Additionally, list all remote repositories currently configured on your system:

flatpak remote-list

How to Check for Available Updates

Then, check for available updates to all installed Flatpak applications:

flatpak update

How to Update System-Wide Installations

Additionally, update all applications installed at the system level (available to all users):

sudo flatpak update --system

The flatpak update command checks and applies updates for the current scope (user-level by default). Adding --system targets system-wide installations instead. Use --user to explicitly update only your user account’s applications, or omit the flag to update your default installation scope.

View Application Details and Metadata

Additionally, see detailed information about an application, including its version and metadata:

flatpak info <application-name>

See GIMP details:

flatpak info org.gimp.GIMP

Running Applications

While most Flatpak applications appear in your desktop menu, you can also launch them directly from the terminal:

flatpak run <application-name>

Launch GIMP:

flatpak run org.gimp.GIMP

Sideload an Application

When you download a Flatpak descriptor from a vendor site, install it directly without adding a repository. Use the --from flag for .flatpakref files that describe how to pull the application:

flatpak install --from <path-to-file.flatpakref>

For standalone .flatpak bundles that already contain every component, include the --bundle flag so Flatpak treats the file as a self-contained package:

flatpak install --bundle <path-to-file.flatpak>

Create an Application Bundle

To create an application bundle that can be distributed and installed on other systems, use the following command:

flatpak build-bundle <repo-directory> <bundle-file> <application-name>

This command creates a single-file bundle from a local repository that can be transferred to other systems and installed offline.

Install an Application Bundle

Similarly, to install a bundle file, use the install command with the --bundle flag:

flatpak install --bundle <bundle-filename>

To install a bundle file named gimp.flatpak:

flatpak install --bundle gimp.flatpak

List Files in an Application

List the files bundled with an installed Flatpak by printing its installation path and examining the files directory:

flatpak info --show-location <application-name>

Then, append /files to that path or use command substitution. To list everything included with GIMP:

ls "$(flatpak info --show-location org.gimp.GIMP)"/files

Check Application Permissions

Flatpak’s sandboxing restricts application access by default. Check what permissions an application has:

flatpak info --show-permissions <application-name>

Check GIMP permissions:

flatpak info --show-permissions org.gimp.GIMP

Change Application Permissions

When applications need access to specific directories or system resources, modify their permissions using the override command:

flatpak override <application-name> --filesystem=<directory>

Grant GIMP access to a MyPhotos directory:

flatpak override org.gimp.GIMP --filesystem=/home/user/MyPhotos

Update Repository Metadata (AppStream)

If needed, update application metadata for all remote repositories:

flatpak update --appstream

AppStream provides application metadata including descriptions, screenshots, and categories that software centers use to display available applications. Update AppStream data when search results seem outdated or newly published applications don’t appear in searches.

Update a Specific Remote Repository

Alternatively, refresh AppStream metadata for a single remote repository without touching the installed applications by specifying the remote name with the same flag:

flatpak update --appstream <remote-name>

Remove a Remote Repository

If required, remove a remote repository from your system:

flatpak remote-delete <remote-name>

Enforce Stricter Sandbox Isolation

For testing or security purposes, enforce stricter sandboxing when running applications:

flatpak run --sandbox <application-name>

Run GIMP with enhanced isolation:

flatpak run --sandbox org.gimp.GIMP

The --sandbox flag temporarily removes network access, filesystem permissions, and other privileges for testing purposes. This creates a more restricted environment than the application’s default sandbox configuration, useful when evaluating untrusted applications or debugging permission-related issues.

View Installed Flatpak Runtimes

Additionally, list all currently installed runtimes:

flatpak list --runtime

Browse Available Runtimes on Flathub

You can also list all runtimes available in a remote repository:

flatpak remote-ls flathub --runtime

View Detailed Information for All Installations

Finally, display comprehensive details about all installed applications and runtimes:

flatpak list --columns=application,name,version,branch,origin

These essential Flatpak commands provide complete control over application management and system configuration.

Conclusion

Flatpak delivers secure, sandboxed application distribution independent of Ubuntu’s package manager and Snap ecosystem. Whether using Ubuntu’s default repository or the Flatpak Team PPA for newer releases, you now have access to Flathub’s extensive application catalog with consistent behavior across Ubuntu versions. Your system can now run applications from diverse sources while maintaining security through sandboxing, override permissions when needed, and manage installations system-wide or per-user.

Leave a Comment