How to Clear the Yum Cache

July 5, 2024 / How-to Guide

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:

  1. To clean all cached packages from the enabled repository cache directory, log in as root and execute the following command:
    yum clean packages
  2. To completely purge old package information, use:
    yum clean headers
  3. To clean any cached XML metadata from enabled repositories, execute:
    yum clean metadata
  4. 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.

Spread the love