Bug 1573039 - yum isn't cleaning up after itself very well and is consuming massive amounts of disk space.
Summary: yum isn't cleaning up after itself very well and is consuming massive amounts...
Status: CLOSED DUPLICATE of bug 1306992
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit
Version: 27
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2018-04-30 00:53 UTC by Rodd Clarkson
Modified: 2018-04-30 13:28 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-04-30 13:28:13 UTC
Type: Bug

Attachments (Terms of Use)

Description Rodd Clarkson 2018-04-30 00:53:20 UTC
Description of problem:

DNF leaves behind a lot of packages that take up space on the system.

It doesn't seem to be cleaning up after itself.  This may have to do with it automatically downloading updates and then the user either manually updating (me) or infrequently updating (my wife)

Version-Release number of selected component (if applicable):

dnf-2.7.5-2.fc27.noarch currently, but this has been an issue for some time.

How reproducible:


Steps to Reproduce:
1.  Run a fedora system for some time.
2.  Run du -h on /var/cache/PackageKit

Actual results:

I've seen a range of issues (over a number of upgrades of fedora)

Here's some of them:

1. The system won't upgrade complaining that there's not enough space.  Checking /var/cache/PackageKit shows an enormous amount of old packages, often in versions that haven't been used for some time.  For example, my wife tried to run yum update recently and it failed complaining about space.  On checking I found cached packages from fedora 24, 25, 26 and 27 (of which she's currently on 27).  Deleting the folders for 24, 25 and 26 solved the issue and didn't seem to have any unexpected outcomes.  I've had to do this on a number of systems to resolve space issues.

2. I have over 2700 packages in /var/cache/PackageKit/27/metadata/updates/packages/ but my system is currently up to date.  These packages are taking up 6.1G of my filesystem.

It appears that dnf is downloading the 'current' update for a package but doesn't delete older, unneeded 'updates' that weren't acted up.

Expected results:

I would expect two things:

Firstly, if dnf is to download updates automatically it needs to check if older versions have been downloaded and then remove them (or at least delete all older versions when the packages are updated.

Secondly, dnf should remove traces of older versions of fedora when updating.  There doesn't appear to be a need to keep a copy of the older versions cached files on update, and it's unclear why packages and metadata for version 24 are hanging around when you're running 27 (and have updated through all three versions.)

Additional info:

As my wife said, this isn't a mere mortal moment is it (as I had to manually update her system) and she's right.

I've seen to problem a lot, so I apologize for the tardiness of the bug report.

I've filed this as urgent as we are about to enter another update from 27 to 28 and this is likely to affect more users than last time.

Comment 1 Martin Hatina 2018-04-30 11:31:35 UTC
This is PackageKit's cache. Dnf has a cache in /var/cache/dnf. Reassigning.

Comment 2 Rex Dieter 2018-04-30 13:28:13 UTC
should be (mostly) resolved after updating to PK-1.1.9 , see also
and bug #1306992

*** This bug has been marked as a duplicate of bug 1306992 ***

Note You need to log in before you can comment on or make changes to this bug.