• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to re-create the yum cache (force a fetch of the cache data) from enabled repositories in CentOS/RHEL

by admin

This post briefly outlines how it possible to re-create the yum cache, or said in another way, force a fetch of the cache data from the enabled yum repositories.

The enabled yum repositories are the ones in the following file /etc/yum.conf or in the following folder /etc/yum.repos.d that have their “enabled” setting to “1“, e.g. :

# vi /etc/yum.repos.d/test.repo
[test_repo]
name=Test Repo
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

Run the following command on the CentOS/RHEL machine :

# yum makecache

It will re-download all the cache data from the enabled repositories.

Filed Under: CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. Downloading RPM Packages with dependencies [ yumdownloader Vs yum-downloadonly Vs repoquery]
  2. How to Remove Network Printer in CentOS/RHEL
  3. Integrate Linux Servers with Active Directory using Samba, Winbind, and Kerberos
  4. Linux OS service ‘dhcpd’
  5. CentOS / RHEL 7 : How to boot into Rescue Mode or Emergency Mode
  6. How to Limit/throttle rsync transfer speed in Linux
  7. Beginners guide to Device Mapper (DM) multipathing
  8. How to Disable RSH Server in CentOS/RHEL
  9. CentOS / RHEL 7 : How to Enable the Old ethX Style Network Interfaces Names
  10. Bash for loop Examples

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright