How to clean yum cache

How to clean yum cache

YUM stands for Yellowdog Updater Modified and is used to install and maintain packages in Linux.  By default, the packages downloaded with yum are kept in cache.  If we need to clean these, the following options are available:

yum clean packages
yum clean headers
yum clean all

yum clean packages will clean all packages from the cache in linux.

yum clean headers will clean all header files that are required to check the availability of packages.  If we clean the headers, then next time, it does a fresh download if it is needed again.

yum clean all will clear the headers as well as packages from the cache.