• 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. How to Migrate virtual machines from one host to another in the Red Hat Virtualization environment
  2. dpkg-query: command not found
  3. What is the purpose of .bash_profile file under User Home Directory In Linux
  4. How to remove unwanted entries in /etc/shadow file
  5. How to Determine Which Process is Writing to Disk in Linux
  6. How to Create a MySQL Docker Container for Testing
  7. a2dissite Command Examples in Linux
  8. test: command not found
  9. Echo Command with Practical Examples
  10. How to Schedule Tasks Using at in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • fprintd-delete Command Examples in Linux
  • fprintd-delete: command not found
  • foreman: command not found
  • foreman Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright