The yum package manager maintains a cache of headers and files in /var/cache/yum. Remove obsolete packages, free up disk space this is a really important to run these commands mentioned here in this post to keep your system performing really good and reduce lagging time for installing updates.
This guide is for distributions using yum package installer “RPM package manager” like Fedora, CentOS and openSUSE.
Pros and Cons
Removing unneeded packages will improves machine performance and Free up disk space.
Removing this packages you might need in the future, sometimes you need it in case you have similar broken packages to replace with, just to save some time for installing it directly from old ons instead of downloading those packages again.
By default, yum retains the packages and package data files that it downloads, so that they may be reused in future operations without being downloaded again. To purge the package data files, use this command:
$ yum clean headers
Run this command to remove all of the packages held in the caches:
$ yum clean packages
To clean the metadata files use this command:
$ yum clean metadata
This cache can grow rather large over time, and can be cleaned with the yum “clean” option. Clean all cached files and packages from active repository.
$ yum clean all
When using these commands, at the prompt, enter the password for the root account.
*Purging cached files causes those files to downloaded again the next time that they are required. This increases the amount of time required to complete the operation.*
Redhat documentations http://docs.redhat.com/docs/en-US/index.html
YUM guides http://yum.baseurl.org/wiki/Guides