7. 在升级前管理您的 bookworm 系统
本附录包含在升级到 trixie 之前,如何确保您能够从 bookworm 安装或升级软件包的相关信息。
7.1. 升级您的 bookworm 系统
Basically this is no different from any other upgrade of bookworm you’ve been doing. The only difference is that you first need to make sure your package list still contains references to bookworm as explained in Checking your APT source-list files.
如果您从 Debian 镜像升级,将自动升级到最新的 bookworm 的小版本更新。
7.2. Checking your APT configuration
If any of the lines in your APT sources files (see
sources.list(5))
contain references to “stable”, this is effectively pointing to
trixie already. This might not be what you want if you are not yet
ready for the upgrade. If you have already run apt update
, you can
still get back without problems by following the procedure below.
如果您已经从 trixie 安装了软件包,就没有太大的必要再从 bookworm 安装软件包了。在这种情况下,您必须决定是否继续或者终止。降级软件包是可能的,但是不属于本文的讨论范围。
As root, open the relevant APT sources file(s) (such as
/etc/apt/sources.list
or any file under /etc/apt/sources.list.d/
)
with your favorite editor, and check all
lines beginning with
deb http:
deb https:
deb tor+http:
deb tor+https:
URIs: http:
URIs: https:
URIs: tor+http:
URIs: tor+https:
for a reference to “stable”. If you find any, change “stable” to “bookworm”.
如果有些行以 deb file:
或 URIs: file:
开始,您应该自己检查该位置是否包含有 bookworm 或者 trixie 的档案仓库。
重要
不要修改任何以 deb cdrom:
或 URIs: cdrom:
开始的行。如果这样做了的话,这些行就会失效,您将需要重新运行 apt-cdrom
命令以启用从光盘更新的功能。即使在 cdrom:
的行发现 “unstable” 这样的字符串也不要感到奇怪。虽然令人困惑,但这是正常的。
如果做了任何修改,保存文件后执行
# apt update
以刷新软件包列表。
7.3. Performing the upgrade to latest bookworm release
To upgrade all packages to the state of the latest point release for bookworm, do
# apt full-upgrade
7.4. 删除过时的配置文件
在将系统升级到 trixie 之前,建议从系统中删除旧的配置文件(例如 /etc
下的 *.dpkg-{new,old}
文件)。