This guide explains how to clear the yum cache. When a package is downloaded, installed, and then removed, it might still be stored in the yum cache.
Let us find out how to clear the yum cache:
- To clean all cached packages from the enabled repository cache directory, log in as root and execute the following command:
yum clean packages
- To completely purge old package information, use:
yum clean headers
- To clean any cached XML metadata from enabled repositories, execute:
yum clean metadata
- If you want to clean all cached files from any enabled repository at once, execute:
yum clean all
This way, you can clear the yum cache. Was not is helpful? If you encounter any issues with this, please get in touch with our support team.
Discover how to automate updates in YUM with our guide: How to Automate Updates in YUM.