Bug 1309736

Summary: [RFE] Improve keepcache option, provide something between keeping all packages and keeping none
Product: [Fedora] Fedora Reporter: Christian Stadelmann <fedora>
Component: dnfAssignee: rpm-software-management
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: rawhideCC: packaging-team-maint, vmukhame
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Christian Stadelmann 2016-02-18 15:04:38 UTC
Description of problem:
I'd like to have a feature in dnf to not keep all packages, but be more intelligent on that.

Use case:
I've enabled the 'keepcache' option to be able to downgrade without another download for two reasons:
1. When running software from testing repos I sometimes want to check for regressions.
2. When running into serious regressions that break my network connection, I can still downgrade back to something that works.

This use case goes wrong with 'keepcache' if there are many updates. Since installing F23 some packages have seen 10+ updates which are all lying around on my disk. I don't need more than the last two. Currently I'm having several tens of gigabytes on disk.

The RFE is:
Please add an option or logic to dnf to not keep all packages ever downloaded. I can think of a non-binary 'keepcache' option limiting cache to (one of)
* the last 2 packages
* some cache size limit
* some date limit

Version-Release number of selected component (if applicable):
dnf-1.1.6-2.fc23.noarch

How reproducible:
always

Comment 1 Honza Silhan 2016-02-22 12:52:53 UTC
the cache size limit could be used with integration of Cashe project.

Comment 2 Christian Stadelmann 2016-02-22 14:49:09 UTC
Yep, limiting cache size would be a good way to do this and a nice feature to have implemented anyway.

Comment 3 Fedora Admin XMLRPC Client 2016-07-08 09:25:32 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.