If you installed Flatpak on Ubuntu and now want to remove it completely, including installed apps, runtime files, cached data, and leftover directories, this article shows how to clean it up so nothing is left behind.

Ubuntu uses Snap as its default package format and does not include Flatpak by default, but if Flatpak is present on your system, you likely installed it manually, added it while following another software installation guide, or carried it over during an upgrade from an older Ubuntu release.

Removing Flatpak with a simple apt remove flatpak command only uninstalls the package itself, but installed Flatpak applications, runtimes, user data, and cache files can remain on the system and continue using disk space. On systems where Flatpak has been used for a while, these leftover files can add up to several gigabytes.

To completely remove Flatpak, you need to uninstall Flatpak applications, delete runtimes, remove repositories, purge the Flatpak package, and clean up any remaining directories.

In this guide, you’ll learn how to completely remove Flatpak from Ubuntu 26.04, including uninstalling all Flatpak applications, removing the Flatpak service, and cleaning up leftover data, with the same steps also applying to Ubuntu 24.04 and Ubuntu 22.04.

TecMint Weekly Newsletter

Get the Learn Linux 7 Days Crash Course free when you join 34,000+ Linux professionals reading every Thursday.

Check your email for a magic link to get started.

Something went wrong. Please try again.

Why Remove Flatpak?

There are several reasons why people decide to remove Flatpak from their Ubuntu systems.

  • Disk space – Flatpak bundles its own runtimes with each application, so even a small app can pull in 500MB or more of GNOME or KDE libraries.
  • One package manager preference – Using apt, Snap, and Flatpak together means managing updates from three different sources.
  • It came pre-installed – Some Ubuntu configurations include Flatpak support by default, and users who do not use it often remove it to keep their systems clean and streamlined.
  • Sandboxing causes breakage – Flatpak applications run in a sandbox, which can sometimes cause issues with file access, system fonts, or custom themes.
  • Server environments – A desktop application packaging system is generally unnecessary on a headless server, where GUI applications are never used.
  • Slow application startup – Flatpak applications may take longer to launch than native packages because of sandbox initialization overhead, which can be particularly noticeable on older hardware.

Step 1: List All Installed Flatpak Applications

Before removing anything, get a clear picture of what Flatpak has installed on your system.

flatpak list

Output:

Name                          Application ID                        Version   Branch   Installation
GNOME Calculator              org.gnome.Calculator                  46.0      stable   system
Flatseal                      com.github.tchx84.Flatseal            2.2.0     stable   system
GNOME Platform                org.gnome.Platform                    46        stable   system
GNOME Platform Locale         org.gnome.Platform.Locale             46        stable   system

This output shows both user-installed apps like Calculator and Flatseal, and the runtimes they depend on like GNOME Platform. You need to remove the apps first before removing the runtimes, or Flatpak will complain about dependencies.

If this helped you understand what Flatpak actually installs under the hood, who’s been hunting down disk space on their Ubuntu system.

Step 2: Remove All Flatpak Applications

To remove every installed Flatpak app in one shot, run:

flatpak uninstall --all

Output:

ID                                        Branch    Op
 1.     com.github.tchx84.Flatseal               stable    r
 2.     org.gnome.Calculator                      stable    r
 3.     org.gnome.Platform                        46        r
 4.     org.gnome.Platform.Locale                 46        r

Uninstall complete.

The --all flag tells Flatpak to remove every installed application and runtime at once, so you don’t have to uninstall each one manually by ID.

If you see a Nothing installed message, it means Flatpak has no apps registered under your user or the system profile, which is fine.

If you only want to remove apps installed for your user account and not system-wide, add the --user flag:

flatpak uninstall --all --user

If you’ve been wondering why Flatpak takes up so much disk space even for small apps, who’s dealing with the same surprise.

Step 3: Remove the Flatpak Package

Now remove the flatpak package itself using sudo command, which is required because removing system packages needs elevated permissions.

sudo apt remove flatpak

If you also want to remove any leftover config files that apt remove keeps by default, use purge instead:

sudo apt purge flatpak

The purge variant removes both the package and any system-level configuration files registered with dpkg.

Learn Linux in 7 Days on Pro TecMint covers package management with apt end to end, including the difference between remove, purge, and autoremove.

Step 4: Remove Leftover Flatpak Data and Directories

Even after uninstalling all apps and removing the package, Flatpak leaves directories behind in your home folder and system paths. These directories hold runtimes, app data, and cached files that apt won’t touch.

Check if these directories exist on your system:

ls ~/.local/share/flatpak
ls /var/lib/flatpak

Output:

# ~/.local/share/flatpak
app  db  exports  overrides  repo  runtime

# /var/lib/flatpak
app  db  exports  repo  runtime

If either directory is populated, remove them with:

rm -rf ~/.local/share/flatpak
sudo rm -rf /var/lib/flatpak

The rm -rf command removes directories recursively and without prompting for confirmation, so double-check the paths before running it. Running it on the wrong directory is not recoverable without a backup.

Also remove the XDG data directory if it exists:

rm -rf ~/.var/app

This directory holds per-app user data for installed Flatpak applications, things like app preferences, local databases, and cached state. If you had apps like GIMP or LibreOffice installed as Flatpaks, their local data lives here.

Warning: If you plan to reinstall any of these apps later, removing ~/.var/app will wipe their saved settings and data permanently.

Step 5: Remove the Flathub Repository

If you added the Flathub repository as a remote source, remove it as well.

flatpak remotes

If Flatpak is already removed at this point, skip to checking manually:

ls /var/lib/flatpak/repo

Since you’ve already removed the /var/lib/flatpak directory in the previous step, the repo is gone, but if you skipped Step 4 and still have the Flatpak binary installed, remove the remote explicitly:

flatpak remote-delete flathub

Step 6: Run Autoremove and Clean Up

After removing the Flatpak package, run autoremove to clean up any dependency packages that were pulled in alongside it and are no longer needed:

sudo apt autoremove

Finish with an apt clean to clear the local package cache:

sudo apt clean

This removes downloaded .deb files from /var/cache/apt/archives/, freeing a bit more disk space on top of what you’ve already recovered.

If you just cleared out Flatpak and want to know what other package management tools are worth knowing on Ubuntu, friend who still uses Snaps by default.

Step 7: Verify Flatpak Is Completely Removed

Do a final check to confirm nothing is left behind:

which flatpak

No output means the flatpak binary is gone from your PATH. Then check that the data directories are empty:

ls ~/.local/share/flatpak 2>/dev/null && echo "Still exists" || echo "Removed"
ls /var/lib/flatpak 2>/dev/null && echo "Still exists" || echo "Removed"

Both lines should return Removed. If either says Still exists, go back to Step 4 and re-run the rm -rf commands for whichever path still has content.

If this helped you finally get a clean Ubuntu install without Flatpak hanging around, in your team who’s troubleshooting disk space issues on a fresh Ubuntu box.

Conclusion

You removed every trace of Flatpak from Ubuntu 26.04: all installed apps and runtimes, the package itself, leftover data directories, the Flathub remote, and orphaned dependency libraries.

The thing worth doing right now is running df -h before and after this process on your own machine. On systems with several Flatpak apps installed, it’s common to recover 3 to 5 GB, sometimes more if you have large runtimes like GNOME Platform sitting around.

Did you run into anything unexpected while removing Flatpak on your system, or did you find leftover files in a path not covered here? Drop it in the comments below.

If this article helped, with someone on your team.

TecMint Weekly Newsletter

Get the Learn Linux 7 Days Crash Course free when you join 34,000+ Linux professionals reading every Thursday.

Check your email for a magic link to get started.

Something went wrong. Please try again.

Share.
Leave A Reply