参考文章:
https://www.kevin-custer.com/blog/disabling-snaps-in-ubuntu-20-04/https://askubuntu.com/questions/1035915/how-to-remove-snap-store-from-ubuntu本人用的老式笔记本,常年卡顿,使用 top 命令发现 snapd 的进程经常占用了 10% 左右的 CPU,听说是 Ubuntu 官方出的包商店,用它来安装软件还需要挂一层 * 代 * 理去访问,用处有限。从网上搜了资料来卸载掉它。
根据第 1 篇文章里的命令:
sudo snap remove snapd提示错误:
error: snap "snapd" has "auto-refresh" change in progress然后试了第 2 篇文章里的命令:
sudo apt autoremove --purge snapd提示执行成功了:
Reading package lists... DoneBuilding dependency tree Reading state information... DoneThe following additional packages will be installed: gnome-software gnome-software-commonSuggested packages: apt-config-icons-hidpi gnome-software-plugin-flatpakRecommended packages: gnome-software-plugin-snapThe following packages will be REMOVED: gnome-software-plugin-snap* liblzo2-2* snapd* squashfs-tools*The following packages will be upgraded: gnome-software gnome-software-common2 upgraded, 0 newly installed, 4 to remove and 193 not upgraded.Need to get 6,452 kB of archives.After this operation, 121 MB disk space will be freed.Do you want to continue? [Y/n] yGet:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 gnome-software amd64 3.36.1-0ubuntu0.20.04.0 [892 kB]Get:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates/main amd64 gnome-software-common all 3.36.1-0ubuntu0.20.04.0 [5,559 kB]Fetched 6,452 kB in 3s (2,176 kB/s) (Reading database ... 211725 files and directories currently installed.)Removing gnome-software-plugin-snap (3.36.0-0ubuntu3) ...Removing snapd (2.45.1+20.04.2) ...Removing squashfs-tools (1:4.4-1) ...Removing liblzo2-2:amd64 (2.10-2) ...(Reading database ... 211630 files and directories currently installed.)Preparing to unpack .../gnome-software_3.36.1-0ubuntu0.20.04.0_amd64.deb ...Unpacking gnome-software (3.36.1-0ubuntu0.20.04.0) over (3.36.0-0ubuntu3) ...Preparing to unpack .../gnome-software-common_3.36.1-0ubuntu0.20.04.0_all.deb ...Unpacking gnome-software-common (3.36.1-0ubuntu0.20.04.0) over (3.36.0-0ubuntu3) ...Setting up gnome-software-common (3.36.1-0ubuntu0.20.04.0) ...Setting up gnome-software (3.36.1-0ubuntu0.20.04.0) ...Processing triggers for mime-support (3.64ubuntu1) ...Processing triggers for hicolor-icon-theme (0.17-2) ...Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...Processing triggers for libglib2.0-0:amd64 (2.64.2-1~fakesync1) ...Processing triggers for libc-bin (2.31-0ubuntu9) ...Processing triggers for man-db (2.9.1-1) ...Processing triggers for desktop-file-utils (0.24-1ubuntu2) ...(Reading database ... 211630 files and directories currently installed.)Purging configuration files for snapd (2.45.1+20.04.2) ...Stopping snap-snapd-8542.mountStopping unit snap-snapd-8542.mountWaiting until unit snap-snapd-8542.mount is stopped [attempt 1]snap-snapd-8542.mount is stopped.Removing snap snapd and revision 8542Removing snap-snapd-8542.mountStopping snap-snapd-9279.mountStopping unit snap-snapd-9279.mountWaiting until unit snap-snapd-9279.mount is stopped [attempt 1]snap-snapd-9279.mount is stopped.Removing snap snapd and revision 9279Removing snap-snapd-9279.mountFinal directory cleanupDiscarding preserved snap namespacesRemoving extra snap-confine apparmor rulesRemoving snapd cacheRemoving snapd state