After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 768632 - Auto-clean the cache packages
Auto-clean the cache packages
Status: RESOLVED NOTGNOME
Product: gnome-software
Classification: Applications
Component: General
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Software maintainer(s)
GNOME Software maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-07-10 12:38 UTC by jeremy9856
Modified: 2017-07-16 12:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description jeremy9856 2016-07-10 12:38:09 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 !
Comment 1 Jean-François Fortin Tam 2016-07-19 13:03:48 UTC
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)
Comment 2 jeremy9856 2016-07-19 13:16:55 UTC
I think dnf remove the cache automatically by default. It will be great if Gnome Software / PackageKit do the same.
Comment 3 André Klapper 2016-10-14 19:14:15 UTC
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.
Comment 4 jeremy9856 2016-10-15 21:46:37 UTC
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.
Comment 5 cmuellnre 2016-10-20 22:46:35 UTC
(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?
Comment 6 Michael Catanzaro 2016-10-31 11:10:04 UTC
(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.
Comment 7 Bastien Nocera 2017-07-16 12:11:47 UTC
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.