How to clean yum cache on CentOS?

We all know that YUM is an open-source command-line package. When a package is downloaded, installed, and removed there are maximum chances that the package may still be stored in YUM’s cache. 

Follow the below commands in order to clean the YUM cache.

  1. To clean the YUM cache to reclaim disk space due to corrupt metadata files.

    # yum clean packages
  2. To delete metadata from the enabled repository, use the following command

     yum clean metadata
  3. To delete package headers 

    # yum clean headers
  4. To clean all cached information  

    yum clean all

Related Articles

How to set Automate Tasks on a Linux VPS Using Cron?

One of our Linux VPS customers faced an issue wherein his Virtual Machine’s system clock was...

How to Disable SSH Login for the Root User in Linux?

Please refer to the following article to disable root login using SSH in Linux.  Login to your...

How do I enable apache file and directory indexing in Linux or UNIX?

There are 2 ways to enable apache file and directory indexing. Using Apache config file : You...

How to Hide Your NGINX Server Version.

Sometimes hackers target your server with a technic called banner grabbing. Usually, banner...

How to install NodeJS on Centos with cPanel?

NodeJS is an open-source and cross-platform server environment. It is a JavaScript runtime built...

  • 0 Users Found This Useful

Was this answer helpful?