Installing Flatpak on Ubuntu
Flatpak is a universal packaging format similar to snap, but community-driven rather than Canonical-controlled. Its main repository, Flathub, has thousands of applications including many desktop apps that are not available in Ubuntu’s official repositories or as snaps. On server Ubuntu, there is almost no reason to use Flatpak. On desktop Ubuntu, it is useful for getting the latest versions of desktop applications like GIMP, LibreOffice, or Inkscape.
Why Flatpak on Ubuntu
| Reason | Details |
|---|---|
| Latest app versions | Flathub often has newer versions than Ubuntu repos or even snap |
| Community-maintained | Not tied to Canonical; larger selection of desktop apps |
| Sandboxed | Portal-based permission model; apps can't access arbitrary paths |
| App isolation | Each app bundles its runtime; no library conflicts |
| Drawback | Large disk usage; runtime shared but still significant size |
Installing Flatpak
# Step 1: Install Flatpak from Ubuntu repos
sudo apt update
sudo apt install -y flatpak
# Step 2: Install GNOME Software Flatpak plugin (if using desktop with GNOME Software)
sudo apt install -y gnome-software-plugin-flatpak
# Verify Flatpak is installed
flatpak --version
Expected output
Flatpak 1.14.6
📝 NOTE: After installing Flatpak and adding a remote, you need to log out and back in (or reboot) for the Flatpak apps to appear in your application menu and for the portal permissions system to work correctly. This is a one-time requirement.
Adding Flathub
# Add Flathub as a system-wide remote (all users)
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# Or add it only for the current user
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# List configured remotes
flatpak remotes
flatpak remotes output
Name Options
flathub system
Essential Flatpak commands
# Search for an application
flatpak search gimp
flatpak search libreoffice
# Install an application
sudo flatpak install flathub org.gimp.GIMP
sudo flatpak install flathub org.libreoffice.LibreOffice
# Install without confirmation (for scripts)
sudo flatpak install -y flathub org.gimp.GIMP
# Run a Flatpak application
flatpak run org.gimp.GIMP
# List all installed Flatpak apps
flatpak list --app
# List including runtimes
flatpak list
# Update all installed Flatpaks
sudo flatpak update
# Update a specific app
sudo flatpak update org.gimp.GIMP
# Remove an application
sudo flatpak uninstall org.gimp.GIMP
# Remove and clean up unused data
sudo flatpak uninstall --delete-data org.gimp.GIMP
Managing Flatpak permissions
Flatpak sandboxes apps with a permission model based on portals. Apps request access to specific resources — files, camera, microphone — rather than having unrestricted system access.
# Install Flatpak permission manager (GUI)
sudo flatpak install flathub com.github.tchx84.Flatseal
# Run Flatseal to manage permissions graphically
flatpak run com.github.tchx84.Flatseal
# Check an app's permissions from the terminal
flatpak info --show-permissions org.gimp.GIMP
# Override a permission from command line
# Example: grant access to a specific directory
sudo flatpak override org.gimp.GIMP --filesystem=/mnt/data
# Example: restrict network access
sudo flatpak override org.gimp.GIMP --no-share=network
# See all overrides
sudo flatpak override --show org.gimp.GIMP
# Reset all overrides for an app
sudo flatpak override --reset org.gimp.GIMP
Flatpak storage and cleanup
# Check disk usage
du -sh /var/lib/flatpak/
du -sh ~/.local/share/flatpak/ # User-installed
# Remove unused runtimes (runtimes no longer needed by any app)
sudo flatpak uninstall --unused
# See what would be removed before doing it
flatpak uninstall --unused --dry-run
Example output: unused runtimes taking space
The following runtimes are not used by any installed app:
org.freedesktop.Platform/x86_64/23.08 (214.7 MB)
org.gnome.Platform/x86_64/44 (326.1 MB)
Proceed with these changes to the system installation? [Y/n]
Conclusion
Flatpak is worth installing on Ubuntu Desktop systems to access the latest versions of applications like GIMP, Inkscape, or LibreOffice from Flathub. It is not useful on servers. Install with sudo apt install flatpak, add Flathub as a remote, then install and manage apps with the flatpak command. Run sudo flatpak uninstall --unused periodically to reclaim disk space from unused runtimes, which can be several hundred megabytes each.
FAQ
Is Installing Flatpak on Ubuntu important for Ubuntu administrators?+
Yes. It supports practical Ubuntu administration because it connects directly to server reliability, security, troubleshooting, or daily operations.
Should I practice this on a live server?+
Use a lab VM first. After you understand the command output and rollback path, apply the workflow carefully on real systems.
What should I do after reading this article?+
Run the practice commands, write down what each one shows, and continue to the next article in the Ubuntu roadmap.
Need help with Ubuntu administration?
Work directly with Muhammad Irfan Aslam for Ubuntu Server, Linux, cloud, Docker, DevOps, CI/CD, or infrastructure troubleshooting support.
Hire Me for Support