Home >Operation and Maintenance >CentOS >How to use the yum command to clear the cache list under centos

How to use the yum command to clear the cache list under centos

王林
王林Original
2020-03-30 15:15:566845browse

How to use the yum command to clear the cache list under centos

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn