Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1262145

Summary: 'dnf system-upgrade clean' and 'dnf clean packages' does not clean downloaded system upgrade packages
Product: [Fedora] Fedora Reporter: Donavan Lance <shvr>
Component: dnf-plugin-system-upgradeAssignee: Will Woods <wwoods>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 23CC: comcast.really.sucks, fredrik, jgotts, kparal, satellitgo, shvr, wwoods
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 0.4.1-1.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-25 08:13:38 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 Donavan Lance 2015-09-11 00:06:41 UTC
Description of problem:
After using 'dnf --releasever=23 system-upgrade download' to download packages for a system upgrade, neither 'dnf clean packages' nor 'dnf system-upgrade clean' will clean out the downloaded packages. This is before any call to 'dnf system-upgrade upgrade' or 'dnf system-upgrade reboot'.

I specifically encountered the issue when 'dnf --releasever=23 system-upgrade download' failed running the transaction test due to an unsigned package. I wanted to clean out all of the downloaded files and redownload everything after waiting for a bit but no 'dnf' command worked. When 'dnf system-upgrade download' finishes it prints this message:

Download complete! Use 'dnf system-upgrade reboot' to start the upgrade.
The downloaded packages were saved in cache till the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.

I ended up needing to manually delete /var/lib/dnf/system-upgrade manually.


Version-Release number of selected component (if applicable):
dnf-plugin-system-upgrade-0.4.0-1.fc22.noarch


How reproducible:
Always.


Steps to Reproduce:
1. Run 'dnf --releasever=23 system-upgrade download'
2. Run 'dnf clean packages' or 'dnf system-upgrade clean'

Actual results:
Packages downloaded by 'dnf system-upgrade download' are not cleaned.

Expected results:
Packages downloaded by 'dnf system-upgrade' are cleaned from the system.

Additional info:
N/A

Comment 1 Fedora Update System 2015-09-15 19:07:16 UTC
dnf-plugin-system-upgrade-0.4.1-1.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15941

Comment 2 Fedora Update System 2015-09-15 19:07:25 UTC
dnf-plugin-system-upgrade-0.4.1-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15942

Comment 3 Donavan Lance 2015-09-16 01:06:08 UTC
This bug appears to be fixed by dnf-plugin-system-upgrade-0.4.1-1.fc22

Comment 4 Fedora Update System 2015-09-16 04:52:43 UTC
dnf-plugin-system-upgrade-0.4.1-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf-plugin-system-upgrade'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15940

Comment 5 Fedora Update System 2015-09-17 01:02:15 UTC
dnf-plugin-system-upgrade-0.4.1-1.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf-plugin-system-upgrade'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15941

Comment 6 Fedora Update System 2015-09-17 01:05:51 UTC
dnf-plugin-system-upgrade-0.4.1-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf-plugin-system-upgrade'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15942

Comment 7 Fedora Update System 2015-09-18 01:31:26 UTC
dnf-plugin-system-upgrade-0.4.1-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2015-09-18 18:29:27 UTC
dnf-plugin-system-upgrade-0.4.1-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Need Real Name 2015-11-18 00:59:58 UTC
Still a bug, Fedora 23. After upgrading from Fedora 22:


# rpm -qa dnf-plugin-system-upgrade
dnf-plugin-system-upgrade-0.7.0-1.fc23.noarch

# ls -ralt /var/lib/dnf/system-upgrade | wc -l
2388

# du /var/lib/dnf/system-upgrade 
1933688	/var/lib/dnf/system-upgrade

# dnf system-upgrade clean

# ls -ralt /var/lib/dnf/system-upgrade | wc -l
2388

# du /var/lib/dnf/system-upgrade 
1933688	/var/lib/dnf/system-upgrade

# dnf clean packages
Cleaning repos: adobe-linux-x86_64 ulyaoth fedora rpmfusion-free-updates-testing
              : google-chrome-unstable rpmfusion-nonfree google-talkplugin
              : google-chrome fedora-spotify rpmfusion-nonfree-updates-testing
              : rpmfusion-free Dropbox updates
0 package files removed

# ls -ralt /var/lib/dnf/system-upgrade | wc -l
2388

# du /var/lib/dnf/system-upgrade 
1933688	/var/lib/dnf/system-upgrade

Comment 10 John Gotts 2016-06-13 18:55:10 UTC
Definitely still a problem.

[root@jeglap cache]# cat /etc/fedora-release 
Fedora release 23 (Twenty Three)
[root@jeglap cache]# pwd
/var/cache
[root@jeglap cache]# dnf clean all
0 files removed
[root@jeglap cache]# dnf system-upgrade clean
Cleaning up downloaded data...
[root@jeglap cache]# du -sh * | grep 'G '
3.7G	system-upgrade
2.7G	yum

Everything in /var/cache/system-upgrade/packages/* is Fedora 22 stuff.

[root@jeglap cache]# dnf system-upgrade clean --releasever=22
Cleaning up downloaded data...
[root@jeglap cache]# du -sh * | grep 'G '
3.7G	system-upgrade
2.7G	yum

This had no effect, either.

Comment 11 Fedora End Of Life 2016-11-24 12:29:06 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Kamil Páral 2016-11-25 08:13:38 UTC
I tried upgrading from F25 to rawhide. /var/lib/dnf/system-upgrade is cleaned after upgrade. Before the upgrade, "dnf system-upgrade clean" cleans it as well. "dnf clean packages" doesn't, but I'm not sure it's supposed to. So overall this seems fixed.

dnf-1.1.10-3.fc25
dnf-plugin-system-upgrade-0.7.1-3.fc25