ubuntu卸载snap

背景

ubuntu20系统卸载snap占用一堆挂载

步骤如下

查看snap安装了哪些包

snap list 

逐个卸载

sudo snap remove lxd --purge
sudo snap remove core20 --purge
sudo snap remove snapd --purge

卸载snap

sudo apt autoremove --purge snapd

ubuntu22

卸载snap包firefox时会报错

$ sudo snap remove --purge firefox
error: cannot perform the following tasks:
- Remove data for snap "firefox" (1943) (unlinkat /var/snap/firefox/common/host-hunspell/en_ZA.dic: read-only file system)

解决方法

systemd命令umount目录

$ sudo systemctl stop var-snap-firefox-common-host\\x2dhunspell.mount
$ sudo systemctl disable var-snap-firefox-common-host\\x2dhunspell.mount 
Removed /etc/systemd/system/default.target.wants/var-snap-firefox-common-host\x2dhunspell.mount.
Removed /etc/systemd/system/multi-user.target.wants/var-snap-firefox-common-host\x2dhunspell.mount.

重启系统也不再挂载

执行的动作其实包含了目录卸载命令sudo umount /var/snap/firefox/common/host-hunspell

posted @ 2023-01-16 17:27  ishmaelwanglin  阅读(2653)  评论(0编辑  收藏  举报