要使用 yum 清理 CentOS 包緩存,請按照以下步驟操作:
打開終端。
輸入以下命令,然后按 Enter 鍵。這將列出所有可用的 yum 緩存倉庫。
yum repolist all
sudo yum clean all
此命令將刪除所有緩存的軟件包和元數據。這有助于釋放磁盤空間。
<repository_id>
替換為您要清理的倉庫 ID:sudo yum clean <repository_id>
例如,要清理名為 “epel” 的倉庫緩存,請輸入:
sudo yum clean epel
完成這些步驟后,您的 CentOS 包緩存將被清理。