To install Flatpak apps on Ubuntu, you first enable Flatpak support, then add Flathub, and finally install apps via the command line or the GNOME Software center. This guide walks through the entire process, from enabling the technology to troubleshooting common issues, so you can start using Flatpak’s extensive library of sandboxed applications.
What is Flatpak and Why Use It?
Flatpak is a framework for distributing desktop applications across different Linux distributions. Instead of relying on the system’s libraries, each Flatpak app bundles its own dependencies in a sandbox, which isolates it from the rest of the system. This approach offers several advantages: you get newer versions of software than what your distribution’s repositories provide, apps work consistently across different distros, and the sandboxing improves security. For Ubuntu users, Flatpak complements the native APT system and Snap, giving you more choices for installing software.
Prerequisites and Initial Setup
Before installing Flatpak, ensure your system is up to date. Open a terminal and run:
sudo apt update
sudo apt upgrade
This ensures you have the latest package lists and system packages, which helps avoid conflicts during Flatpak installation.
Installing Flatpak on Ubuntu
Flatpak is available in Ubuntu’s official repositories. To install it, run:
sudo apt install flatpak
If you are using GNOME (the default desktop environment), you may also want to install the Flatpak plugin for GNOME Software, which allows you to install and manage Flatpak apps from the graphical Software center:
sudo apt install gnome-software-plugin-flatpak
For KDE Plasma users, the equivalent plugin is plasma-discover-backend-flatpak.
Adding Flathub Repository
Flathub is the primary repository for Flatpak apps, similar to the Ubuntu Software Center but community-driven. To add it, run:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
After adding the repository, reboot your system (or log out and back in) so that the Flatpak environment is fully recognized by your desktop. This step is crucial for the GNOME Software plugin to display Flatpak apps correctly.
Installing Your First Flatpak App
Once Flatpak and Flathub are set up, you can install apps. The basic command is:
flatpak install flathub <app-id>
For example, to install the popular note-taking app Joplin, you would run:
flatpak install flathub net.cozic.joplin_desktop
You can find the exact app ID on the Flathub website (flathub.org) or by searching with:
flatpak search <app-name>
After installation, you can launch the app from your application menu or via the command line with flatpak run <app-id>.
Managing Flatpak Apps
Flatpak provides simple commands for managing your installed applications:
- List installed apps:
flatpak list - Update all apps:
flatpak update - Uninstall an app:
flatpak uninstall <app-id> - Remove unused runtimes:
flatpak uninstall --unused
These commands help you keep your Flatpak environment clean and up to date.
Using Flatpak from the GUI
If you installed the GNOME Software plugin, you can browse and install Flatpak apps directly from the Software center. After rebooting, open GNOME Software, and you’ll see a “Flathub” section. Simply search for an app, click Install, and it will be added to your system. This is the easiest method for new users who prefer a graphical interface.
Common Issues and Troubleshooting
Here are some frequent problems you might encounter:
- Flatpak command not found: Ensure you installed the
flatpakpackage correctly. If you’re on a minimal system, you might need to install it explicitly. - Apps don’t appear in the menu: Log out and log back in, or restart your system. This refreshes the desktop environment’s application cache.
- Permission errors: Some apps need to be run with
flatpak run --useror require additional permissions that you can grant viaflatpak override. - Slow first launch: The first time you run an app, it may take longer as it initializes the sandbox. Subsequent launches are faster.
Flatpak vs. Snap vs. APT
Ubuntu comes with Snap pre-installed, and APT is the traditional package manager. Here’s a quick comparison:
- APT: Uses system libraries, fast and lightweight, but often has older versions.
- Snap: Canonical’s sandboxed format, automatic updates, but sometimes slower to start and uses more disk space.
- Flatpak: Distro-agnostic, focuses on desktop apps, and has a large repository (Flathub). It’s a great choice for apps not available in Snap or APT.
You can use all three simultaneously; they don’t conflict. Choose based on availability and your preference for update frequency.
Frequently Asked Questions
Do I need to enable Flatpak in Ubuntu 24.04?
Yes, Flatpak is not enabled by default on Ubuntu. You must install the flatpak package and add the Flathub repository as described above.
Can I install Flatpak apps without sudo?
Yes, Flatpak supports user-level installation. Use flatpak install --user flathub <app-id> to install apps only for your user, which doesn’t require sudo. However, system-wide installation is the default and often simpler.
Why do some Flatpak apps not work correctly?
Flatpak apps are sandboxed, so they might lack access to certain system resources (like USB devices or network shares). You can grant permissions using flatpak override or by using the Flatseal GUI tool to manage permissions.
How do I update Flatpak apps?
Run flatpak update in the terminal, or use the GNOME Software center to update all apps. You can also set up automatic updates via a cron job or systemd timer.
Is Flatpak safe?
Flatpak’s sandboxing provides a strong security layer, but no system is completely immune. Only install apps from trusted sources like Flathub, and be cautious when granting permissions.
Can I remove Flatpak entirely?
Yes, you can uninstall Flatpak with sudo apt remove flatpak. However, this will also remove all installed Flatpak apps. If you want to keep the apps, consider reinstalling them via APT or Snap.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- How to Add & Remove Favorites in Windows 10 Photos App
- Fix Links Not Opening in Chrome: 7 Top Ways
- Connect Alexa to a Soundbar: Choose the Right Setup
- Fix Host Process for Setting Synchronization in Windows 10
- Windows 11 search how to control automatic indexing of frequently used folders?
- How to Set Up Tips on Twitter (X) for Android & iOS