yum-rhn-plugin on RHEL7 does not respect the keepcache=0 entry at /etc/yum.conf

Solution Verified - Updated -

Issue

  • A Red Hat Enterprise Linux 7 system registered to Satellite 5.x does not respect the option keepcache=0 set at /etc/yum.conf. For any yum operation, all the RPM packages are being kept under /var/cache/yum directory.
# cat /etc/yum.conf  | grep -v ^$ | grep -v ^#
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3

# yum install tree -y
Loaded plugins: product-id, rhnplugin, search-disabled-repos, subscription-manager, verify
This system is receiving updates from RHN Classic or Red Hat Satellite.
Resolving Dependencies
--> Running transaction check
---> Package tree.x86_64 0:1.6.0-10.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================
 Package             Arch                  Version                      Repository                           Size
==================================================================================================================
Installing:
 tree                x86_64                1.6.0-10.el7                 rhel-x86_64-server-7                 46 k

Transaction Summary
==================================================================================================================
Install  1 Package

Total download size: 46 k
Installed size: 87 k
Downloading packages:
tree-1.6.0-10.el7.x86_64.rpm                                                               |  46 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : tree-1.6.0-10.el7.x86_64                                                                       1/1 
  Verifying  : tree-1.6.0-10.el7.x86_64                                                                       1/1 

Installed:
  tree.x86_64 0:1.6.0-10.el7              

# tree /var/cache/yum/
/var/cache/yum/
└── x86_64
    └── 7Server
        ├── rhel-x86_64-server-7
        │   ├── cachecookie
        │   ├── comps.xml
        │   ├── gen
        │   │   ├── primary.xml
        │   │   └── primary.xml.sqlite
        │   ├── packages
        │   │   └── tree-1.6.0-10.el7.x86_64.rpm
        │   ├── primary.xml.gz
        │   ├── repomd.xml
        │   ├── rhnversion
        │   └── updateinfo.xml.gz
        └── rhnplugin.repos

5 directories, 10 files

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Satellite 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content