Ubuntu 20.04 卸載 snapd


參考文章:

  1. https://www.kevin-custer.com/blog/disabling-snaps-in-ubuntu-20-04/
  2. 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... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  gnome-software gnome-software-common
Suggested packages:
  apt-config-icons-hidpi gnome-software-plugin-flatpak
Recommended packages:
  gnome-software-plugin-snap
The following packages will be REMOVED:
  gnome-software-plugin-snap* liblzo2-2* snapd* squashfs-tools*
The following packages will be upgraded:
  gnome-software gnome-software-common
2 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] y
Get: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.mount
Stopping unit snap-snapd-8542.mount
Waiting until unit snap-snapd-8542.mount is stopped [attempt 1]
snap-snapd-8542.mount is stopped.
Removing snap snapd and revision 8542
Removing snap-snapd-8542.mount
Stopping snap-snapd-9279.mount
Stopping unit snap-snapd-9279.mount
Waiting until unit snap-snapd-9279.mount is stopped [attempt 1]
snap-snapd-9279.mount is stopped.
Removing snap snapd and revision 9279
Removing snap-snapd-9279.mount
Final directory cleanup
Discarding preserved snap namespaces
Removing extra snap-confine apparmor rules
Removing snapd cache
Removing snapd state


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM