温馨提示×

如何卸载debian cpustat

小樊
43
2026-09-25 21:43:00
栏目: 智能运维

在 Debian 系统中,cpustat 通常是通过 cpustat 软件包安装的(由 Colin King 维护,属于 stress-ng 相关工具集)。你可以按以下方式卸载:

1. 确认是否已安装

dpkg -l | grep cpustat

或

which cpustat

2. 使用 apt 卸载

如果只是想删除程序但保留配置文件:

sudo apt remove cpustat

如果想连配置文件一起彻底删除:

sudo apt purge cpustat

3. 清理不再需要的依赖(可选)

sudo apt autoremove

4. 如果你是用源码或其他方式安装的

  • 源码编译安装(无包管理器记录): 通常只能手动删除:

    sudo rm -f /usr/bin/cpustat
    sudo rm -f /usr/share/man/man8/cpustat.8.gz
    

    具体路径可用 which cpustat 查看。

  • Snap 安装(较少见):

    sudo snap remove cpustat
    

如果你不确定当初是怎么装的,可以把 which cpustat 和 dpkg -S $(which cpustat) 的输出发给我,我帮你判断。

0 踩