236 条记录
23 私有链接
23 私有链接
Debain 12 如何升级到 Debian 13
确认当前版本
lsb_release -a
更新 Debian 12 到最新状态
sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo reboot
修改软件源(核心步骤)
sudo nano /etc/apt/sources.list
把所有的:bookworm 全部替换为:trixie
重点
Debian 12 之后把 non-free-firmware 单独拆出来了,一定要保留
第三方源(Docker、Node、CUDA、国内镜像)建议先注释掉
示例(标准官方源):
deb https://deb.debian.org/debian trixie main contrib non-free non-free-firmware
deb https://deb.debian.org/debian trixie-updates main contrib non-free non-free-firmware
deb https://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware
刷新软件索引
sudo apt update
如有提示 release info changed,输入 Y
最小升级(防止大规模冲突)
sudo apt upgrade --without-new-pkgs
完整升级
sudo apt full-upgrade
过程中注意:
配置文件询问:
服务器建议选 keep local version
重启
sudo reboot
确认系统版本
lsb_release -a
应显示:Debian GNU/Linux 13 (trixie)
清理旧包
sudo apt --purge autoremove
sudo apt clean
升级失败 / 依赖冲突
sudo apt -f install
sudo dpkg --configure -a