Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  Web Hosting FAQ  >  Clean the YUM Cache in CentOS
Top Scroll

Clean the YUM Cache in CentOS

 2 min

This article will explain how to clean the YUM cache in CentOS.

YUM is an abbreviation for Yellowdog Updater, Modifier which is a free and open-source command-line package-management tool. It is developed for computers with Linux Operating System using the RPM Package Manager. YUM enables you to automatically update packages and dependency management on RPM-based distribution. There are chances that package may get stored in YUM’s cache even after the package is downloaded, installed or removed. You can see that cache packages are mostly found in /var/cache/yum.

You may need to clear the YUM cache to make some space on disk or to fix errors that occurred due to corrupted metadata files.

To clear YUM cache you need to be logged in to the server as root user and then execute following commands.

1) Clean all the cached packages located in the enabled repository cache directory.

yum clean packages

2) Delete the package headers.

yum clean headers

3) Delete metadata of all the enabled repository.

yum clean metadata

4) Clean all the cached information.

yum clean all

That’s it!

Following these steps, you can surely clean the YUM cache in CentOS.

Also Read :

1) How To Clear WordPress Cache?

2) Learn to clear the local DNS cache in Linux

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.