emm第一次见到这么简单的跨版本升级

先把所有软件包升级到当前最新版

Bash
apt updateapt upgrade -yapt full-upgrade -yapt autocleanapt autoremove -y

然后把apt源里的bookworm换成trixie

Bash
sed -i 's/bookworm/trixie/g' /etc/apt/sources.listsed -i 's/bookworm/trixie/g' /etc/apt/sources.list.d/*.listsed -i 's/bookworm/trixie/g' /etc/apt/sources.list.d/*.sources

再升级一次

Bash
apt updateapt upgrade -yapt full-upgrade -y

自动删除不需要的

Bash
apt autocleanapt autoremove -y

最后reboot重启就好

Bash
root@debian ~ $ cat /etc/debian_version 13.0root@debian ~ $ lsb_release -aNo LSB modules are available.Distributor ID:	DebianDescription:	Debian GNU/Linux 13 (trixie)Release:	13Codename:	trixieroot@debian ~ $ uname -aLinux upload 6.12.38+deb13-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.38-1 (2025-07-16) x86_64 GNU/Linux