Bug 1052020

Summary: "dnf clean all" should clean everything
Product: [Fedora] Fedora Reporter: Miroslav Suchý <msuchy>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: rawhideCC: akozumpl, edirsh, fedora, jzeleny, packaging-team-maint, pnemade, pviktori, rholy, samuel-rhbugs, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-13 07:09:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miroslav Suchý 2014-01-13 06:29:44 UTC
Description of problem:
Dnf clean all
dnf clean metadata, should clean *all* data. Not just currently enabled repository.

This was twice rejected for yum (see bug 160171, bug 693242) but let corre^H^H^ redefine this behaviour in dnf.

See this thread for more discussion:
https://lists.fedoraproject.org/pipermail/devel/2014-January/193780.html

Comment 1 Ales Kozumplik 2014-01-13 06:31:47 UTC
maybe. we'll think on it.

Comment 2 Ales Kozumplik 2014-01-13 07:08:38 UTC
hmm the drawback of this is that it would be the first (sub)command to implicitly manipulate the enabled/disabled repos.

Comment 3 Miroslav Suchý 2014-01-13 08:50:51 UTC
And why it is should be bad? And why it should work from top down. E.g. when you want to delete database in SQL world, you do not delete individual records, but you do DATABASE TRUNCATE.

I.e. dnf clean all can take a shortcut and execute rm -rf /var/cache/dnf/

This is bug. Therefore it should not be NOTABUG but rather WONTFIX. But please rely reconsider.
I really think that current behaviour confuse people more then the proposed one. And proposed solution will save people several hundreds of MB on disk.

Comment 4 Jan Zeleny 2014-01-13 11:19:34 UTC
That is not necessarily true. We have already seen this on multiple occasions. Some people find the current behavior confusing and some people find anything new an unacceptable regression.

While the semantics of "clean all" as a phrase might be different than what happens, the behavior is clearly documented and man page without any doubt specifies that "clean all" means "perform all the cleanup actions described above".

Comment 5 Ben Boeckel 2014-01-15 05:29:33 UTC
What about "dnf clean ALL"?