sudo apt update && sudo apt upgrade
Get:1 https://deb.nodesource.com/node_20.x jammy InRelease [4,563 B]
Hit:2 http://in.archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:5 http://in.archive.ubuntu.com/ubuntu jammy-backports InRelease
Fetched 4,563 B in 1s (5,379 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
libavdevice58 libopenexr25 libpostproc55 libavcodec58 libavutil56
libswscale5 libswresample3 libavformat58 libavfilter7
Learn more about Ubuntu Pro at https://ubuntu.com/pro
The following packages have been kept back:
snapd
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
apt list --upgradable
Listing... Done
snapd/jammy-updates 2.61.3+22.04 amd64 [upgradable from: 2.58+22.04]
N: There are 3 additional versions. Please use the '-a' switch to see them.
答案1
您无需停止 snapd 服务即可在 Ubuntu 中升级 snapd。停止 snapd 服务可能会中断任何正在运行的 snap 应用程序(如 Firefox),因此通常建议避免停止它。
运行以下命令来升级 snapd 包。
sudo apt update
sudo apt upgrade snapd