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.