Yum method to clear the cache list:
1. Clear the software packages in the cache directory. Clear the cache under (/var/cache/yum)
yum clean packages
2. Clear the headers in the cache directory
yum clean headers
(Recommended tutorial: centos tutorial)
3. Clear the old headers in the cache directory
yum clean oldheaders
4. Clear the software packages and old headers in the cache directory
yum clean all (= yum clean packages; yum clean oldheaders)
In addition: If you encounter the problem that /var/run/yum.pid has been locked when running yum, the PID is xxxx Another program is running problem solved.
Solution:
rm -f /var/run/yum.pid
It can be used by running yum again after deleting the file.
Recommended related video tutorials: linux video tutorial
The above is the detailed content of How to use the yum command to clear the cache list under centos. For more information, please follow other related articles on the PHP Chinese website!