How to Install Flatpak on Ubuntu

Flatpak delivers universal application distribution across Linux systems through secure sandboxing. Unlike Ubuntu’s traditional APT packages that integrate tightly with system libraries, Flatpak bundles every dependency inside each application, ensuring consistent behavior across all Ubuntu releases. This isolation mirrors the sandboxing approach used by macOS App Store downloads and Windows containerized apps.

This guide walks through installing Flatpak on Ubuntu from the default repository or the Flatpak Team PPA when you need newer builds, adding the Flathub repository with thousands of applications, and mastering essential commands from basic installation to advanced permission management. By the end, you will have a working Flatpak installation with full access to Flathub’s application catalog.

Choose Your Flatpak Installation Method

Ubuntu provides Flatpak through its default repositories, but the Flatpak Team also maintains PPAs with newer releases. The table below compares both options to help you choose the right approach.

MethodChannelVersionUpdatesBest For
Default APT RepositoryUbuntu ReposDistribution defaultAutomatic via apt upgradeMost users who want stability
Flatpak Team Stable PPALaunchpad PPALatest stableAutomatic via apt upgradeUsers needing newer features
Flatpak Team Development PPALaunchpad PPADevelopment buildsAutomatic via apt upgradeTesters and developers

For most users, the default APT repository is recommended because it provides thoroughly tested versions that integrate well with Ubuntu’s update cycle. Only use the PPAs if you specifically need features unavailable in Ubuntu’s packaged version or are troubleshooting bugs fixed in newer releases.

This guide covers Ubuntu 22.04 LTS, 24.04 LTS, and 26.04 LTS. Both the default repository and the Flatpak Team PPAs provide packages for all supported LTS releases. Commands shown work identically across these versions.

Choose Flatpak or Snap for Ubuntu Apps

Flatpak excels when you need identical application builds across multiple Ubuntu releases or want software that Snap does not offer. Since Flatpak bundles libraries and runtimes with each application, desktop apps such as GIMP, Blender, and LibreOffice behave the same on laptops, desktops, and immutable systems. Additionally, Flatpak provides better desktop theme integration and more granular permission controls through sandbox overrides. If you are switching away from Snap for specific applications like Firefox, our guide on removing Firefox Snap from Ubuntu covers the process.

In contrast, Snap remains the better default for Canonical-maintained packages like core system tools because it hooks into Ubuntu’s automatic updates and benefits from direct integration with Ubuntu’s infrastructure. Use Snap when Canonical provides an optimized build or when you are already managing Snap-only tools such as LXD or MicroK8s.

Use Flatpak when you frequently share applications across different Ubuntu installations, rely on upstream releases from Flathub, or need more precise permission controls. With that context, proceed with the installation steps below.

Update Ubuntu Before Installation

Open the terminal by searching for “Terminal” in the Activities menu or pressing Ctrl+Alt+T. Before installing Flatpak, update your system to ensure all existing packages are current and dependency resolution works correctly:

sudo apt update && sudo apt upgrade

Running apt update refreshes your package index, while apt upgrade applies pending security patches and bug fixes. This step prevents dependency conflicts during Flatpak installation.

Method 1: Install Flatpak via Default APT Repository

Ubuntu ships Flatpak in its default repository but does not 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.

Install Flatpak using APT:

sudo apt install flatpak

After installation completes, verify the installed version:

flatpak --version

Expected output varies by Ubuntu version:

Flatpak 1.16.2   # Ubuntu 26.04 LTS
Flatpak 1.14.6   # Ubuntu 24.04 LTS
Flatpak 1.12.7   # Ubuntu 22.04 LTS

Add the Flathub Repository

Next, add the Flathub repository to access thousands of applications. Run this command to add Flathub system-wide, making applications available to all users on the machine:

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

Verify the remote was added correctly:

flatpak remotes
flathub	system

The output confirms Flathub is configured at the system level, meaning all users can install and run Flatpak applications.

Flatpak commands default to system-wide scope. To add Flathub for your user account only, use flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo instead. User-level installations are useful for testing or when you lack sudo access.

Reboot for Full Integration

Flatpak requires a reboot after initial installation to fully integrate with your desktop environment. The XDG portal services that handle file dialogs, notifications, and other desktop interactions only start after restarting your session:

sudo reboot

Alternatively, you can log out and log back in to apply most changes without a full reboot, though a complete restart ensures all portal services initialize correctly.

Method 2: Install Flatpak via Flatpak Team 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.

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 to make new packages available:

sudo apt update

Then, install Flatpak from the PPA:

sudo apt install flatpak

Finally, add the Flathub repository system-wide:

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

Verify the installed version to confirm you are running the PPA release:

flatpak --version
Flatpak 1.16.x

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

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.

Remember to reboot after initial installation to enable full desktop integration, as described in Method 1.

Managing Applications with Flatpak Commands

After installing Flatpak and adding Flathub, you can manage applications through essential commands covering installation, updates, permissions, and system configuration. The following sections provide a comprehensive reference for daily Flatpak usage.

Search for Applications

Before installing, search Flathub to find the correct application identifier. The search command queries all configured remotes:

flatpak search <search-term>

For example, searching for GIMP returns available packages:

flatpak search gimp
GNU Image Manipulation Program  Create images and edit photographs      org.gimp.GIMP   3.0.6   stable  flathub
GIMP User Manual                GIMP User Manual                        org.gimp.GIMP.Manual    2.10    2.10    flathub

The Application ID column (org.gimp.GIMP) is what you use for installation and other commands.

Install Applications

Once you identify an application, install it with the following command. System-wide installations require sudo:

sudo flatpak install flathub <application-id>

For example, install GIMP:

sudo flatpak install flathub org.gimp.GIMP

Flatpak prompts you to confirm the installation and download required runtimes. The -y flag auto-confirms for scripted installations.

List Installed Applications

View all applications installed through Flatpak:

flatpak list

For detailed information including versions and installation scope:

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

Update Applications

Keep all installed Flatpak applications current with a single command:

sudo flatpak update

To update a specific application only:

sudo flatpak update org.gimp.GIMP

The flatpak update command updates system-wide installations by default. Add --user to update only user-level installations. Without sudo, Flatpak attempts to update user-scope applications.

Run Applications

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

flatpak run <application-id>

Launch GIMP:

flatpak run org.gimp.GIMP

Terminal launching is useful for debugging application issues or passing command-line arguments.

Uninstall Applications

Remove applications you no longer need:

sudo flatpak uninstall <application-id>

Remove GIMP:

sudo flatpak uninstall org.gimp.GIMP

To also remove unused runtimes that are no longer needed by any application:

sudo flatpak uninstall --unused

View Application Details

Get detailed information about an installed application, including its version, runtime, and installation path:

flatpak info <application-id>

View GIMP details:

flatpak info org.gimp.GIMP

Manage Remote Repositories

Flatpak uses remote repositories to distribute applications. List all configured remotes:

flatpak remotes

Add a new remote repository:

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

Remove a remote repository:

sudo flatpak remote-delete <remote-name>

The --if-not-exists flag prevents errors when re-running setup scripts on systems that already have the remote configured.

Check and Modify Application Permissions

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

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

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

sudo flatpak override <application-id> --filesystem=<directory>

For example, grant GIMP access to a custom photos directory:

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

Reset all permission overrides to defaults:

sudo flatpak override --reset <application-id>

View and Manage Runtimes

Flatpak applications depend on shared runtimes that provide common libraries. List all installed runtimes:

flatpak list --runtime

Browse available runtimes on Flathub:

flatpak remote-ls flathub --runtime

Runtimes are installed automatically when needed and can be cleaned up with flatpak uninstall --unused.

Update Repository Metadata

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 do not appear:

flatpak update --appstream

To refresh metadata for a specific remote only:

flatpak update --appstream flathub

Run Applications with Enhanced Isolation

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

flatpak run --sandbox <application-id>

Run GIMP with enhanced isolation:

flatpak run --sandbox org.gimp.GIMP

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

Install Flatpak Bundles and Refs

Occasionally you may download Flatpak files directly from a vendor’s website rather than installing from Flathub. Flatpak supports two offline installation formats:

.flatpakref files are small descriptor files that tell Flatpak where to download the application:

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

.flatpak bundles are self-contained packages that include the entire application and can be installed offline:

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

Use bundles when you need to install applications on systems without internet access or when distributing internally built applications.

Troubleshooting Common Issues

This section addresses issues users commonly encounter with Flatpak on Ubuntu.

Applications Not Appearing in Menu

If installed Flatpak applications do not show up in your application menu, reboot your system to ensure XDG desktop integration services have started. If the problem persists after a reboot, update the desktop database manually:

update-desktop-database ~/.local/share/applications

File Dialogs Not Working Correctly

If file dialogs appear blank or non-functional, the XDG portal services may not be running. Install the portal backend for your desktop environment:

sudo apt install xdg-desktop-portal-gtk

For KDE Plasma desktops, install the KDE-specific portal instead:

sudo apt install xdg-desktop-portal-kde

Restart your session after installing portals.

Theme Integration Issues

Flatpak applications may not match your system theme because the sandbox isolates them from system configuration. Install the GTK theme pack from Flathub:

sudo flatpak install flathub org.gtk.Gtk3theme.Adwaita-dark

Replace Adwaita-dark with your preferred theme name. Search available themes with:

flatpak search gtk3theme

Permission Denied Errors

If an application cannot access files you expect it to reach, the sandbox may be blocking access. Grant filesystem permissions using the override command:

sudo flatpak override <application-id> --filesystem=home

Common filesystem paths you might need to grant:

  • home: Full home directory access
  • host: Full filesystem access (use sparingly)
  • /path/to/directory: Specific directory access

Remove Flatpak from Ubuntu

If you no longer need Flatpak, you can remove it along with all installed applications and repositories.

Uninstall All Flatpak Applications

First, remove all installed Flatpak applications and unused runtimes:

sudo flatpak uninstall --all

Remove the Flathub Repository

Remove the Flathub remote:

sudo flatpak remote-delete flathub

Uninstall the Flatpak Package

Remove the Flatpak package and its dependencies:

sudo apt remove --autoremove flatpak

Remove Flatpak PPA (If Used)

If you installed Flatpak from the Flatpak Team PPA, remove the repository source:

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

For the development PPA:

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

Clean Up Remaining Data

The following commands permanently delete Flatpak application data. If you have documents or settings stored within Flatpak applications that you want to keep, back them up first.

Remove system-wide Flatpak data:

sudo rm -rf /var/lib/flatpak

Remove user-level Flatpak data:

rm -rf ~/.local/share/flatpak ~/.var/app

Conclusion

Flatpak delivers secure, sandboxed application distribution independent of Ubuntu’s package manager and Snap ecosystem. Whether you installed from Ubuntu’s default repository for stability 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 run applications from diverse sources while maintaining security through sandboxing, override permissions when needed, and manage installations system-wide or per-user. For more information on Flatpak features and advanced usage, consult the official Flatpak documentation.

Leave a Comment

Let us know you are human: