How to Remove Unneeded Flatpak Apps

Out of curiosity, I checked if I have any flatpack apps installed.
The following were found

flatpak list                                                                                                                                                                                                                                                                          
Name                               Application ID                                 Version          Branch              Installation
Mesa                               org.freedesktop.Platform.GL.default            21.3.9           21.08               system
Intel                              org.freedesktop.Platform.VAAPI.Intel                            21.08               system
openh264                           org.freedesktop.Platform.openh264              2.1.0            2.0                 system
Breeze GTK theme                   org.gtk.Gtk3theme.Breeze                       5.27.6           3.22                system
KDE Application Platform           org.kde.Platform                                                5.15-21.08          system

I have no clue how those flatpack were installed. Can those safely be removed? Can I replace any flatpack needed by the EOS system using repos?

Have you installed any previous flatpaks in the past and removed them? Or installed anything specific? EOS doesn’t have flatpaks as part of installation.

Flatpaks can install other packs with it. When I installed Bottles I ended up with 13 packs in total, and when uninstalling bottles I still had to remove the other flatpaks too.

3 Likes

I’m going to guess you installed a flatpak before and these are leftover dependencies from it, you should be right to remove them as long as you aren’t using that program before.

2 Likes

agree with all: you had something installed that dragged all this in:

twice a week i do: flatpak update -y && flatpak remove --unused -y

or

flatpak uninstall blah.blah.blah individually

7 Likes

This worked like a charm. All were uninstalled in a blink of an eye.

2 Likes

Great work with this, I learned something too. I uninstalled all of mine manually adding the package names with spaces, which does work as bottles was the only flatpak package I had installed, but this command is better for general maintenance in future.

2 Likes

Is there a difference between flatpak remove --unused -y and flatpak uninstall --unused -y? The result seems to be the same.

Sorry, the question should go to @drunkenvicar.

Excellent! I learned something new as well. Thanks for this. Added to my command cheat sheet.

not sure. that flatpak command is been in my arsenal for a long time and, of course, was kiped (cut and pasted) from someone else long ago, like the best commands are :slight_smile:

There is no difference between flatpak remove --unused -y and flatpak uninstall --unused -y. The commands are equivalent.

remove is simply an alias for uninstall in Flatpak. Both commands will remove unused runtimes and extensions that are not used by any installed Flatpak applications.

The -y flag automatically answers “yes” to any prompts, allowing the operation to proceed without user intervention.

So, essentially, there is no need to run both. It’s like running sudo pacman -Rs google-chrome && yay -Rs google-chrome. Only one of the operations will actually do something. The first one in this case.

Source (line 82): https://github.com/flatpak/flatpak/blob/ff8490a91e3c6d9e8ff146e76a5b30ccaf22fdf0/app/flatpak-main.c#L82-L83

The alias was added for users of package managers like dnf, yum, and apt.

4 Likes

thanks @anon93652015 , @drunkenvicar for the explanation

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.