How to Completely Remove Flatpak - Linux Mint
In this tutorial, we'll be discussing how to completely remove Flatpak from Linux Mint.
We'll first check what applications are installed with Flatpak. Then we are going to uninstall Flatpak applications.
Finally, we are going to purge the entire Flatpak ecosystem. The main reason for uninstalling Flatpak is the huge disk space which takes up.
You can find more ways to clean up disk space in Linux Mint in this article:
7 Steps To Free Up Space On Linux Mint
Step 1: List all Flatpak application
Depending on your Linux Mint version all Flatpak applications can be listed by terminal command like:
flatpak list
result:
flatpak list
Ref Options
com.obsproject.Studio/x86_64/stable system,current
org.gimp.GIMP/x86_64/stable system,current
org.openshot.OpenShot/x86_64/stable system,current
Or by launching Software Manager:
- Start Software Manager
- Click Flatpak - if available
- all apps with green tick are installed and use Flatpak
Step 2: Uninstall all Flatpak application
In this step we are going to remove all Flatpak applications. There are several ways to remove Flatpak applications.
The Software manager allows us to uninstall applications one by one.
Removing multiple Flatpak application at once by:
flatpak uninstall --unused
or
flatpak uninstall --all
After those commands list of installed applications should be empty or reduced. This can be verified by:
flatpak list
Step 3: Remove Flatpak completely
Even if all Flatpak applications are uninstalled you have a huge amount of disk space occupied by Flatpak. In my case folder:
var/lib/flatpak
it was full with 4 GB.
Next commands helped me to clean this space. To completely remove Flatpak from your system run:
sudo flatpak repair
and:
sudo apt-get remove --autoremove flatpak
sudo apt-get purge flatpak
This time var/lib/flatpak
was empty and I was able to win 4 GB.
Error: Remote "flathub" not found
If you face this error than you need to run in terminal:
flatpak remote-add flathub https://flathub.org/repo/flathub.flatpakrepo
Error: Command 'flatpak' not found
In case of error: 'flatpak' not found
then you need to install it again by:
sudo apt install flatpak