温馨提示×

如何卸载ubuntu compton

小樊
49
2026-09-04 01:01:17
栏目: 智能运维

在 Ubuntu 上卸载 compton(现在很多发行版已改用 picom,但包名可能仍是 compton),可以按下面步骤操作:


1. 确认是否安装了 compton

which compton

dpkg -l | grep compton

如果显示路径或包名,说明已安装。


2. 卸载 compton

如果是通过 apt 安装的:

sudo apt remove compton

如需彻底删除配置文件:

sudo apt purge compton

然后清理依赖:

sudo apt autoremove

3. 如果是通过源码编译安装的

如果你之前是 make install 安装的,apt 无法管理:

sudo make uninstall

(需要在当初编译的源码目录中执行)

如果没保留源码,可手动删除:

sudo rm -f /usr/local/bin/compton
sudo rm -f /usr/local/share/man/man1/compton.1

4. 停止正在运行的 compton

pkill compton

5. 移除开机自启(如有)

如果你在以下位置配置过自启,需要删除:

  • ~/.config/autostart/compton.desktop
  • i3 / Openbox / 桌面环境启动脚本中的 compton &

例如:

rm -f ~/.config/autostart/compton.desktop

6. (可选)改用 picom

如果你只是想换合成器:

sudo apt install picom

如果你告诉我是用哪种方式安装的(apt / 源码 / snap)以及桌面环境(GNOME / KDE / i3 等),我可以给你更精确的卸载方案。

0