安装 Ubuntu 18.04 后,我注意到该过程的带宽流量很大snapd
,而且由于我不使用 snap 应用程序,所以我决定删除 snap。
我用了这个命令
$ sudo apt purge snapd ubuntu-core-launcher squashfs-tools
这是输出
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'ubuntu-core-launcher' is not installed, so not removed
The following packages will be REMOVED:
gnome-software-plugin-snap* snapd* squashfs-tools*
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 57.4 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 317306 files and directories currently installed.)
Removing gnome-software-plugin-snap (3.28.1-0ubuntu4) ...
Removing snapd (2.32.5+18.04) ...
Removing squashfs-tools (1:4.3-6) ...
Processing triggers for man-db (2.8.3-2) ...
(Reading database ... 317244 files and directories currently installed.)
Purging configuration files for snapd (2.32.5+18.04) ...
Stopping snap-communitheme-97.mount
Stopping unit snap-communitheme-97.mount
Waiting until unit snap-communitheme-97.mount is stopped [attempt 1]
snap-communitheme-97.mount is stopped.
Removing snap communitheme and revision 97
Removing snap-communitheme-97.mount
Stopping snap-core-4486.mount
Stopping unit snap-core-4486.mount
Waiting until unit snap-core-4486.mount is stopped [attempt 1]
snap-core-4486.mount is stopped.
Removing snap core and revision 4486
Removing snap-core-4486.mount
Stopping snap-gnome\x2d3\x2d26\x2d1604-59.mount
Stopping unit snap-gnome\x2d3\x2d26\x2d1604-59.mount
Waiting until unit snap-gnome\x2d3\x2d26\x2d1604-59.mount is stopped [attempt 1]
snap-gnome\x2d3\x2d26\x2d1604-59.mount is stopped.
Removing snap gnome-3-26-1604 and revision 59
Removing snap-gnome\x2d3\x2d26\x2d1604-59.mount
Stopping snap-gnome\x2dcalculator-154.mount
Stopping unit snap-gnome\x2dcalculator-154.mount
Waiting until unit snap-gnome\x2dcalculator-154.mount is stopped [attempt 1]
snap-gnome\x2dcalculator-154.mount is stopped.
Removing snap gnome-calculator and revision 154
Removing snap-gnome\x2dcalculator-154.mount
Stopping snap-gnome\x2dcharacters-69.mount
Stopping unit snap-gnome\x2dcharacters-69.mount
Waiting until unit snap-gnome\x2dcharacters-69.mount is stopped [attempt 1]
snap-gnome\x2dcharacters-69.mount is stopped.
Removing snap gnome-characters and revision 69
Removing snap-gnome\x2dcharacters-69.mount
Stopping snap-gnome\x2dlogs-25.mount
Stopping unit snap-gnome\x2dlogs-25.mount
Waiting until unit snap-gnome\x2dlogs-25.mount is stopped [attempt 1]
snap-gnome\x2dlogs-25.mount is stopped.
Removing snap gnome-logs and revision 25
Removing snap-gnome\x2dlogs-25.mount
Stopping snap-gnome\x2dsystem\x2dmonitor-36.mount
Stopping unit snap-gnome\x2dsystem\x2dmonitor-36.mount
Waiting until unit snap-gnome\x2dsystem\x2dmonitor-36.mount is stopped [attempt 1]
snap-gnome\x2dsystem\x2dmonitor-36.mount is stopped.
Removing snap gnome-system-monitor and revision 36
Removing snap-gnome\x2dsystem\x2dmonitor-36.mount
Stopping snap-spotify-x1.mount
Stopping unit snap-spotify-x1.mount
Waiting until unit snap-spotify-x1.mount is stopped [attempt 1]
snap-spotify-x1.mount is stopped.
Removing snap spotify and revision x1
Removing snap-spotify-x1.mount
Final directory cleanup
Discarding preserved snap namespaces
umount: /run/snapd/ns/vlc.mnt: not mounted.
Removing extra snap-confine apparmor rules
Removing snapd cache
Removing snapd state
我注意到它删除了核心系统应用程序。我如何才能再次撤消该过程以恢复 snap 和那些应用程序?
提前致谢
答案1
如果你错误地卸载了 Ubuntu 系统上的核心软件包,只需使用一个命令即可将deb
软件包重新安装:-
笔记:这假定您之前安装了原装 Ubuntu 产品,而不是其他版本。
sudo apt install ubuntu-desktop^
一旦snapd
重新安装(应该使用上述命令),您可以重新安装预装的 snap 包:-
sudo snap install gnome-calculator
sudo snap install gnome-characters
sudo snap install gnome-logs
sudo snap install gnome-system-monitor
communititheme
只需重复此过程,或使用图形化 Ubuntu 软件获取附加快照,如vlc
等。