Opened 10 years ago
#125 new enhancement
Limit size of yum cache
Reported by: | dmik | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | yum | Version: | |
Severity: | Keywords: | ||
Cc: |
Description
The RPM files installed by yum are downloaded to /var/cache/yum/<REPO>/packages
. The total size of these files may become quite big, especially when there're major updates of a big number of packages. It seems that yum itself doesn't control this at all (doesn't remove old packages out of there etc) so it may easily occupy all free space after some time.
We need a way to clean it up on a regular basis.
My suggestion is that we set two limits: size and age. Something like 100M and 1 month seems sane here. The best place for such a check is yum install/yum update — i.e. the commands that may potentially increase the cache size. I don't know though if it's easy to hook in to these commands.