How do one uninstall a program installed with Flatpak [Xubuntu 18.04]
Additional info on how to uninstall the package manager Flatpack
As I also wanted to uninstall the package manager Flatpak as well I took the time to look up how to do that and thought I would collect it here as a future reference for anyone in need of this info.
In short:
Uninstalling flatpak and its dependencies
sudo apt-get remove --auto-remove flatpak
Purging the config/data too
sudo apt-get purge --auto-remove flatpak
More info here: http://installion.co.uk/ubuntu/yakkety/universe/f/flatpak/uninstall/index.html
After that I did check the /var/lib/flatpak
where Flatpak resides, and to my shock I discovered the folder took up a whooping 4.2 GB of massive space, all that after a couple of days trying it out and having 3 programs installed (Atom, Audacity, Gimp).
Looking around the internet one will come across a few comments on this matter how much space Flatpak uses and fails to clean up after itself after uninstalling it.
More on this here: https://github.com/flatpak/flatpak/issues/1391
Anyhow, I went on and deleted the folder and its content with the following line:
rm -r -f /var/lib/flatpak/
Obs! Be careful with this command, read more on how to remove folders and its content here: How do I remove a folder?
There is one more folder with, in my case, a tiny amount of data which I also removed.
/home/YourUserName/.local/share/flatpak/
I think that should have most traces and data of Flatpack removed.
And as noted by @mook765 in his comment above I had to change from
flatpak --user uninstall io.atom.Atom
to..
flatpak --system uninstall io.atom.Atom
to get the program uninstalled.
Related videos on Youtube
Badtz Maru
Updated on September 18, 2022Comments
-
Badtz Maru over 1 year
I am new to Linux (30 years MS user, it all began in DOS...) and have managed to install Xubuntu 18.04 (my first Linux install ever), and a few programs too, one of them is Atom text editor which was installed with some command line found on the internet, and apparently it was done with help of some "Flatpak package manager" (I learned only afterwards that there are several types of packet managers to assist user install a program on Linux, and that I had used one), now I would like to uninstall Atom text editor but I have not been able to do it.
The command line I used to install Atom looked like:
flatpak install flathub io.atom.Atom
(Obs! while installing, Xubuntu complained and so some additional Flatpak utilities had to also be installed in order to finalize the Atom installation.)
Anyhow, while searching for ways of uninstalling the program I found another string for listing programs installed with Flatpak, that looked like this:
flatpak list -d --app --runtime
And it put out the following line:
io.atom.Atom/x86_64/stable flathub 1e5c659b47a2 - 551,2 MB system,current
I copied part of that string associated with Atom and used it in an uninstall command line that looked like this, with the error message following it:
flatpak --user uninstall io.atom.Atom error: io.atom.Atom/*unspecified*/*unspecified* not installed
What should the uninstall command line look like in order to uninstall Atom text editor?
-
user535733 almost 6 yearsWelcome to AskUbuntu! While you can use any package manager you wish, new users generally find Ubuntu's native
apt
to be easy to learn and best supported here. -
mook765 almost 6 yearsAs far as I see, the package is installed system-wide, not per-user, so you should omit the
--user
option when uninstalling or use the--system
-option instead. -
Badtz Maru almost 6 years@mook765 Yes indeed, I changed the command line to
flatpak --system uninstall io.atom.Atom
and the uninstall worked, and checking once again withflatpak list -d --app --runtime
I see the Atom text editor isn't anymore in the list and my HDD freed up some 500+MB, problem solved, thanks!
-
-
tanius almost 4 yearsPlease move the actual answer from the bottom to the top of your answer text. That's what people come here for, and those experienced in Stack Exchange platforms will not expect the answer in either comments or at the very bottom … and leave, even though they were so close ;-)