在 Debian 系统中,cpustat 通常来自 sysstat 软件包(或者单独叫 cpustat,取决于发行版本)。下面按常见情况说明如何卸载。
dpkg -S $(which cpustat)
常见结果:
/usr/bin/cpustat 属于 sysstatcpustat 包(较少见)如果你只想移除 cpustat 而不影响其他 sysstat 工具(如 sar、iostat),不能直接单独卸载 cpustat,因为它是 sysstat 的一部分。
只能整体卸载 sysstat:
sudo apt remove sysstat
或彻底清除配置:
sudo apt purge sysstat
sudo apt remove cpustat
或
sudo apt purge cpustat
sudo apt autoremove
which cpustat
无输出即表示已卸载。
如果你是在 容器 / 最小化 Debian / 特定版本(如 Debian 11/12) 下操作,可以告诉我具体版本,我可以给你更精确的命令。