We need to clean the YUM cache to reclaim the disk space used or to fix some errors due to corrupted metadata files.
- Clean all the cached packages from the enabled repository cache directory.
yum clean packages
- Delete package headers.
yum clean headers
- Delete metadata for each enabled repository.
yum clean metadata
-
Clean database cache yum clean dbcache
-
Clean expire cache yum clean expire-cache
- Clean all cached information.
yum clean all
Done!