Ubuntu – How to completely remove flatpak


I have removed flatpak with sudo apt-get purge flatpak; however, if I run locate flatpak I find several files and several directories. Can I remove them all with rm -r or there is a "better" way? If so, how do I have to do that?


Since my output is 21909 rows long and, as @mook765 noted, nobody will ever be so crazy to read them all I think I should reformulate the question as follows: if I had a normal installation of flatpak, what would be the best way to remove it and all its files and folders?

Best Answer

  • I'm assuming you didn't uninstall the run times that flatpak applications require. I would recommend reinstalling flatpak and running the following commands:

    flatpak uninstall --unused
    sudo apt-get remove --autoremove flatpak
    sudo apt-get purge flatpak

    This should erase the majority of the files left behind from flatpak. I had around 4000 after trying it out. I decided it wasn't for me and had to look for a few hours to find a way to remove the majority of the files. These three commands had reduced nearly 4000 files that dealt with flatpak to 197.

    Hope this helps.