Is there a temporary folder I can find the RPM's that yum downloads to install programs? During an installation yum shows the exact name of the RPM file but I don't know how to find it. How can I search for the RPM if I know the name of it?
5 Answers
I believe what you are looking for is /var/cache/yum/<repo>/packages. This directory is expunged during package cleanup.
You can search for a file by name with the find command. An example: find / -name 'package.rpm' Wildcards are supported. find -name 'package*.rpm'
- 478
- 3
- 9
-
3`/var/cache/yum` is a configurable location. You need to check main.cachedir in `/etc/yum.conf` – William Pursell Aug 04 '18 at 14:13
-
1I had to first enable `keepcache=1` in `/etc/yum.conf` as per https://unix.stackexchange.com/a/79458/227037. – Alex May 31 '23 at 14:55
I verified today that on RHEL 6.7, the files are stored in /var/cache/yum/x86_64/6Server/rhel-6-server-rpms/packages/.
It is also worth noting that the plugin downloadonly is included in RHEL 6:
# yum install yum-downloadonly
Package yum-plugin-downloadonly-1.1.30-30.el6.noarch is obsoleted by yum-3.2.29-69.el6.noarch which is already installed
- 4,852
- 11
- 24
- 40
- 31
- 2
It found in below location here x86_64 if for 64 bit centos/RHEL OS. It exist at location as package.rpm.tmp
/var/cache/yum/x86_64/7/
/var/cache/yum/x86_64/6/
- 1
The location of the cache is configurable, and although the default is /var/cache/yum/, it's much more reliable to check the value of main.cachedir in /etc/yum.conf.
- 1,563
- 10
- 16