cosmic-store icon indicating copy to clipboard operation
cosmic-store copied to clipboard

[Feature Request] Option to run the `flatpak uninstall --unused` Command automatically when "updating / uninstalling" in the cosmic-store.

Open Bezalelohim opened this issue 1 year ago • 4 comments

For Example, removing Nvidia Drivers, automatically on the side when updating, will save a Ton of disk space by default. Beginners would not know to update and then run the flatpak uninstall --unused command, and they shouldn't have to.

This is how the drivers pile up on the system when the unused command is not run.

org.freedesktop.Platform.GL.nvidia-525-60-11
org.freedesktop.Platform.GL.nvidia-525-78-01
org.freedesktop.Platform.GL.nvidia-xxx-xx-xx

Having a provision to automatically remove that would be useful.

Suggestion for implementation: Having an opt-out toggle for the --unused flag in the settings of cosmic-store, this will automatically use the unused command when uninstalling from cosmic-store. For users who do not want this feature (Stability reasons or whatever it maybe) can do so by turning off the toggle in the settings, but it should be on by default.

Bezalelohim avatar Jun 28 '24 08:06 Bezalelohim

Generally a lot of unneeded dependencies are left behind when using the store. For example installing Flatseal from the store will install the following flatpaks:

$ flatpak list
Name                                             Application ID                                 Version            Branch                 Installation
Flatseal                                         com.github.tchx84.Flatseal                     2.2.0              stable                 user
Mesa                                             org.freedesktop.Platform.GL.default            24.1.3             23.08                  user
Mesa (Extra)                                     org.freedesktop.Platform.GL.default            24.1.3             23.08-extra            user
openh264                                         org.freedesktop.Platform.openh264              2.4.1              2.4.1                  user
GNOME Application Platform version 46            org.gnome.Platform                                                46                     user
Pop Gtk theme                                    org.gtk.Gtk3theme.Pop-dark                                        3.22                   user

However clicking uninstall on the store will only uninstall Flatseal and leave all the other flatpaks behind. This could amount into a lot of disk-space wasted in a longer running install.

flatpak uninstall --unused should be run after every uninstall/update on the store

py-crash avatar Aug 15 '24 08:08 py-crash

Generally a lot of unneeded dependencies are left behind when using the store. For example installing Flatseal from the store will install the following flatpaks:

$ flatpak list
Name                                             Application ID                                 Version            Branch                 Installation
Flatseal                                         com.github.tchx84.Flatseal                     2.2.0              stable                 user
Mesa                                             org.freedesktop.Platform.GL.default            24.1.3             23.08                  user
Mesa (Extra)                                     org.freedesktop.Platform.GL.default            24.1.3             23.08-extra            user
openh264                                         org.freedesktop.Platform.openh264              2.4.1              2.4.1                  user
GNOME Application Platform version 46            org.gnome.Platform                                                46                     user
Pop Gtk theme                                    org.gtk.Gtk3theme.Pop-dark                                        3.22                   user

However clicking uninstall on the store will only uninstall Flatseal and leave all the other flatpaks behind. This could amount into a lot of disk-space wasted in a longer running install.

flatpak uninstall --unused should be run after every uninstall/update on the store

idk if it should run every time, gnome and kde provide a button after removing the app so the user can decide if they want to keep the left behind data or not, for example i like keeping flatpak steam or discord or bottles etc data behind so next time i install it i dont have to set it back up again.

pollux78 avatar Aug 20 '25 08:08 pollux78

It is not about the app data, but about removing the dependencies. Many dependencies (specially runtimes) can use up lots of disk space

py-crash avatar Sep 22 '25 18:09 py-crash

There should be a toggle for this because I would prefer this to be off. There was a few times when some flatpaks were removed without my content and I had to reinstall it again.

usbeehu avatar Nov 04 '25 21:11 usbeehu