温馨提示×

如何卸载linux compton配置

小樊
37
2026-10-18 10:57:06
栏目: 智能运维

在 Linux 中“卸载 compton 配置”通常分几种情况:你只是想删除配置文件,还是想彻底卸载 compton 软件本身,或者是停止并禁用它。下面分别说明。


一、仅删除 compton 配置文件

compton 的常见配置文件位置:

  • ~/.config/compton.conf
  • ~/.compton.conf
  • /etc/compton.conf(较少见)

删除命令示例:

rm -f ~/.config/compton.conf
rm -f ~/.compton.conf

如果你不确定有哪些相关文件,可以搜索:

find ~ -name "*compton*"

二、停止并禁用 compton(如果你是用它做窗口特效)

1. 如果是手动启动

直接杀掉进程:

pkill compton

2. 如果是 systemd 用户服务

systemctl --user stop compton
systemctl --user disable compton

3. 如果是随桌面环境/窗口管理器启动

检查以下位置并删除相关配置:

  • ~/.xinitrc
  • ~/.xprofile
  • i3 / bspwm / openbox 等配置文件中 exec compton 或 compton & 的行

例如 i3:

nano ~/.config/i3/config

删掉类似:

exec --no-startup-id compton

三、彻底卸载 compton 软件

根据你的发行版:

Debian / Ubuntu / Linux Mint

sudo apt remove compton
sudo apt purge compton

Arch Linux / Manjaro

sudo pacman -Rns compton

(注意:Arch 官方仓库已用 picom 替代 compton)

Fedora

sudo dnf remove compton

四、如果你其实用的是 picom(compton 分支)

很多新系统已经没有 compton,而是 picom:

which picom

卸载:

sudo apt remove picom
# 或
sudo pacman -Rns picom

如果你愿意,可以告诉我:

  • 你用的发行版
  • 是 compton 还是 picom
  • 是开机自启还是手动运行

我可以给你更精确的卸载步骤。

0 踩