查看: 82|回覆: 0

[Ubuntu] Ubuntu 20.04 卸载 snapd

[複製鏈接]

2

主題

0

回帖

0

積分

热心网友

金币
0
閲讀權限
220
精華
0
威望
0
贡献
0
在線時間
0 小時
註冊時間
2011-1-21
發表於 2020-11-25 17:56:00 | 顯示全部樓層 |閲讀模式

参考文章:

  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
回覆

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即注册

本版積分規則

相关侵权、举报、投诉及建议等,请发 E-mail:qiongdian@foxmail.com

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部