ZZ74
246 天前
我搜来的,用这个在 22.04 删掉了 snap ,我也不懂好像效果是有的。
```
for p in $(snap list | awk '{print $1}'); do
sudo snap remove $p
done
sudo systemctl stop snapd
sudo systemctl disable --now snapd.socket
for m in /snap/core/*; do
sudo umount $m
done
sudo apt autoremove --purge snapd
rm -rf ~/snap
sudo rm -rf /snap
sudo rm -rf /var/snap
sudo rm -rf /var/lib/snapd
sudo rm -rf /var/cache/snapd
sudo sh -c "cat > /etc/apt/preferences.d/no-snapd.pref" << EOL
Package: snapd
Pin: release a=*
Pin-Priority: -10
EOL
sudo sh -c "cat > /etc/apt/preferences.d/no-firefox.pref" << EOL
Package: firefox
Pin: release a=*
Pin-Priority: -10
EOL
```