在 Ubuntu 上卸载 compton(现在很多发行版已改用 picom,但包名可能仍是 compton),可以按下面步骤操作:
which compton
或
dpkg -l | grep compton
如果显示路径或包名,说明已安装。
sudo apt remove compton
如需彻底删除配置文件:
sudo apt purge compton
然后清理依赖:
sudo apt autoremove
如果你之前是 make install 安装的,apt 无法管理:
sudo make uninstall
(需要在当初编译的源码目录中执行)
如果没保留源码,可手动删除:
sudo rm -f /usr/local/bin/compton
sudo rm -f /usr/local/share/man/man1/compton.1
pkill compton
如果你在以下位置配置过自启,需要删除:
~/.config/autostart/compton.desktopcompton &例如:
rm -f ~/.config/autostart/compton.desktop
如果你只是想换合成器:
sudo apt install picom
如果你告诉我是用哪种方式安装的(apt / 源码 / snap)以及桌面环境(GNOME / KDE / i3 等),我可以给你更精确的卸载方案。