Open the configuration file with a text editor like vi or nano : sudo vi /etc/yum.conf Locate the [main] section and set keepcache to 1 :
Once enabled, every yum install or yum update command will permanently store the downloaded RPMs in the cachedir . Default Cache Locations yum cache download
: Information about available packages (like repomd.xml ) is stored in the same repository-specific subdirectories. Unix & Linux Stack Exchange Open the configuration file with a text editor
[main] cachedir=/var/cache/yum/$basearch/$releasever keepcache=1 Use code with caution. Save and exit. yum cache download