温馨提示×

debian cpustat怎么卸载

小樊
35
2026-09-13 18:45:43
栏目: 智能运维

在 Debian 系统中,cpustat 通常来自 sysstat 软件包(或者单独叫 cpustat,取决于发行版本)。下面按常见情况说明如何卸载。


1. 先确认 cpustat 来自哪个包

dpkg -S $(which cpustat)

常见结果:

  • /usr/bin/cpustat 属于 sysstat
  • 或属于 cpustat 包(较少见)

2. 卸载方式

情况 A:cpustat 属于 sysstat

如果你只想移除 cpustat 而不影响其他 sysstat 工具(如 sariostat),不能直接单独卸载 cpustat,因为它是 sysstat 的一部分。

只能整体卸载 sysstat:

sudo apt remove sysstat

或彻底清除配置:

sudo apt purge sysstat

情况 B:系统中有独立的 cpustat 包

sudo apt remove cpustat

sudo apt purge cpustat

3. 清理无用依赖(可选)

sudo apt autoremove

4. 验证是否卸载成功

which cpustat

无输出即表示已卸载。


如果你是在 容器 / 最小化 Debian / 特定版本(如 Debian 11/12) 下操作,可以告诉我具体版本,我可以给你更精确的命令。

0