GNOME Bugzilla – Bug 768632
Auto-clean the cache packages
Last modified: 2017-07-16 12:11:47 UTC
Could it be possible to add a button in Gnome Software to clear the cache please ? With dnf, for instance, we can do "dnf clean all" to delete all the caches but there is no equivalent in Gnome Software that keep the cached packages in /var/cache/PackageKit. It's really something that can be useful for people like me that use a Chromebook that has just 16GB with Fedora. Right now one of the first thing I do on a clean install is to disable Gnome Software to download updates. Maybe that will help some of you guys : $ gsettings set org.gnome.software download-updates false https://bugs.freedesktop.org/show_bug.cgi?id=80053 Thanks !
I'd rather expect that kind of "advanced" feature in GNOME PackageKit instead—or rather to see the system just auto-clean its cache instead of me having to care about "emptying the trashcan", which is mostly what https://bugs.freedesktop.org/show_bug.cgi?id=80053 is about (in addition to not having the cache triplicated)
I think dnf remove the cache automatically by default. It will be great if Gnome Software / PackageKit do the same.
I do not see a common-enough usecase to add an option for such an advanced feature to the user interface. Proposing to WONTFIX this ticket.
Well a user interface option can and should be avoid if PackageKit/Gnome Software can be a little bit smarter :) As Jean-François Fortin Tam said the system should auto-clean its cache instead of the user having to care about "emptying the trashcan" that is not so simple in that case. The auto-clean feature should be trigged after a successful update and also if the system has been updated with an other tool like dnf.
(In reply to André Klapper from comment #3) > I do not see a common-enough usecase to add an option for such an advanced > feature to the user interface. Proposing to WONTFIX this ticket. It is an obvious problem for several users, that the cache of PackageKit grows to an unacceptable amount (e.g. in my case 16 GiB). A common-enough use-case is that people want to clean that cache in an application-safe way, Because they want to use their hard disk space for other things, than data, which will _never_ be used anymore. There is "pkcon refresh force -c -1" to some of the job (only cleaning metadata but not packages), but it is not sufficient (e.g. in my case it cleared only 4 GiB of PackageKit's cache). Calling "rm -rf /var/cache/PackageKit/metadata/*" solved the problem for me, but it might not be a safe way (PackageKit might be accessing files in this directory while I am deleting them, which might lead to corruption). Even if it is safe to clean the cache like this, it is a not documented way to do so. So there is a use-case. And there are several people affected. Is there some way I can contribute for a solution to this problem?
(In reply to cmuellnre from comment #5) > It is an obvious problem for several users, that the cache > of PackageKit grows to an unacceptable amount > (e.g. in my case 16 GiB). That's the bug that should be fixed. It must be a cache leak as there's no way a single update could become that large, and PackageKit can only have one prepared update at a time. (In reply to cmuellnre from comment #5) > Is there some way I can contribute for a solution > to this problem? You can investigate freedesktop bug #80053.
Closing this, as the bug should really be fixed in PackageKit, as that's what's writing the cache, and accessing it, not gnome-software.