Maybe you want: rm -rf /var/cache/yum
I am a little surprised to see the following message when you issue 'yum clean all' with the most recent version of yum in RHEL 7.4.
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
Rather than implementing a code fix which cleans up /var/cache/yum completely (for disabled and orphaned repos), yum is suggesting to the root user to execute 'rm' with 'recursive' and 'force' options???
Bugzilla is here:
https://bugzilla.redhat.com/show_bug.cgi?id=1357083
Errata is here:
https://access.redhat.com/errata/RHBA-2017:2295
Responses
Yes, it is not yet fixed. I could see that with latest updated yum package it is still throwing that message.
That is true, they have added the hint message which is there in changelog:
- Add hint about rm -rf for yum clean all.
But as per this RHBA-2017:2295 it should rather clean up the repos of inactive as well.
BZ - 1357083 - yum clean all does clean up cache from earlier configured and not enabled now repositories
This was my guess from the beginning after I saw the message the first time, displayed intentionally.sudo yum clean all indeed doesn't clean the entire cache (and I have checked this several times).
Hence it is necessary to execute sudo rm -rf /var/cache/yum in order to clean the 'whole' cache.
Hi Christian,
I think yum clean all is not properly understood. Without referring to the man page, it can give the impression that enabled and disabled/removed repos are cleaned but in reality, performs these tasks.
- clean all cache from enabled repos
- remove all data from unknown repos
- preserve cache of disabled/removed repos
The fix in RHBA-2017:2295 adds a note without being too verbose - to remind users that yum clean all does not clean disabled/removed repos.
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
Disabled/removed repos cache is preserved and a user must specify rm -rf /var/cache/yum in order to remove that data - as per man page.
# man yum
CLEAN OPTIONS
The following are the ways which you can invoke yum in clean mode. Note that "all files" in the commands below means "all files in cur‐
rently enabled repositories". If you want to also clean any (temporarily) disabled repositories you need to use --enablerepo='*' option.
HaHaHa ... good one ... nice to see some humor appearing here in our community ... cool Jörg ! :D
But jokes aside, normally it isn't necessary to cleanup. How often do we enable or disable repos ?
Not often - right ? Once everything is setup, we can keep the cache as it is, so not too much work.
Cheers :)
Christian
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
