温馨提示×

centos cleanup怎么卸载

小樊
43
2026-08-19 04:04:51
栏目: 智能运维

CentOS 里,“centos cleanup” 通常不是官方软件包,而是脚本或工具名。卸载方式取决于它是怎么安装的。下面按常见情况给你说明。


一、先确认它是什么

1️⃣ 查看是否有相关命令

which centos-cleanup
rpm -qa | grep -i cleanup

2️⃣ 查看是否为软件包

rpm -qa | grep -i centos
yum list installed | grep -i cleanup

二、如果是 通过 yum / dnf 安装的

卸载命令

sudo yum remove centos-cleanup

或(CentOS 8+)

sudo dnf remove centos-cleanup

如果名字不确定,可以用:

yum history
yum history undo <ID>

三、如果是 手动安装的脚本

常见于:

  • /usr/local/bin/centos-cleanup
  • /opt/centos-cleanup/
  • 定时任务 /etc/cron.d/

1️⃣ 查找文件

find / -name "*centos*cleanup*" 2>/dev/null

2️⃣ 删除脚本

sudo rm -f /usr/local/bin/centos-cleanup

3️⃣ 删除定时任务

crontab -l
sudo crontab -l

如果有相关行,编辑删除:

crontab -e

四、如果是 系统自带清理(yum 缓存)

这些不是软件,不能卸载,但可以清理:

yum clean all
rm -rf /var/cache/yum

五、我需要你补充一点信息(最重要)

请直接把下面命令的输出贴出来,我可以精确告诉你怎么卸载

rpm -qa | grep -i cleanup
which centos-cleanup

或者告诉我:

  • 你是怎么安装它的?(脚本 / yum / git / 教程)
  • CentOS 版本(7 / 8 / Stream)

我可以直接给你 一条准确卸载命令

0