bian正式发布了,还在debian12的用户可以考虑升级到debian13了。主机测评在这里介绍最简单的升级办法,复制、粘贴、回车即可!注意:数据无价,备份了再升级,避免出现错误导致不必要的损失。

第一步:先升级现有系统组件
apt update
apt upgrade
apt full-upgrade
第二步:清理废物
apt –purge autoremove
然后重启: reboot
第三步:确认当前版本
cat /etc/debian_version
确定你当前已经是最新的debian12了,别搞了半天还是debian11或者其他
第四步:修改源文件
sed -i ‘s/bookworm/trixie/g’ /etc/apt/sources.list
sed -i ‘s/bookworm/trixie/g’ /etc/apt/sources.list.d/*
或者你干脆替换吧,国内用:
cat > /etc/apt/sources.list << EOF
deb https://mirrors.huaweicloud.com/debian/ trixie main non-free non-free-firmware contrib
deb-src https://mirrors.huaweicloud.com/debian/ trixie main non-free non-free-firmware contrib
deb https://mirrors.huaweicloud.com/debian-security/ trixie-security main
deb-src https://mirrors.huaweicloud.com/debian-security/ trixie-security main
deb https://mirrors.huaweicloud.com/debian/ trixie-updates main non-free non-free-firmware contrib
deb-src https://mirrors.huaweicloud.com/debian/ trixie-updates main non-free non-free-firmware contrib
deb https://mirrors.huaweicloud.com/debian/ trixie-backports main non-free non-free-firmware contrib
deb-src https://mirrors.huaweicloud.com/debian/ trixie-backports main non-free non-free-firmware contrib
EOF
海外用:
cat > /etc/apt/sources.list << EOF
deb http://mirrors.linode.com/debian/ trixie main non-free non-free-firmware contrib
deb-src http://mirrors.linode.com/debian/ trixie main non-free non-free-firmware contrib
deb http://mirrors.linode.com/debian-security/ trixie-security main
deb-src http://mirrors.linode.com/debian-security/ trixie-security main
deb http://mirrors.linode.com/debian/ trixie-updates main non-free non-free-firmware contrib
deb-src http://mirrors.linode.com/debian/ trixie-updates main non-free non-free-firmware contrib
deb http://mirrors.linode.com/debian/ trixie-backports main non-free non-free-firmware contrib
deb-src http://mirrors.linode.com/debian/ trixie-backports main non-free non-free-firmware contrib
EOF
接下来回车执行,然后更新过程中根据需要选择是或者否升级你需要升级的,实在不懂就一路yes+回车 !
最后一步:清理废物
apt –purge autoremove
apt autoclean
再次提醒:升级之前备份你的数据,别搞翻车了没办法后悔!
如果机器上没有重要的东西,你可以直接从第四步开始执行!

神马VPS










最新评论
I want to to thank you for this excellent read!! I definitely enjoyed every bit of it. I have got you book-marked to check out new things you
I like this post, enjoyed this one appreciate it for posting.
Definitely, what a splendid blog and enlightening posts, I surely will bookmark your site.Best Regards!
As I website possessor I conceive the content here is very fantastic, thanks for your efforts.
I was suggested this website by my cousin. I am not sure whether this post is written by him as nobody else know such detailed about my difficulty. You are wonderful! Thanks!
Hello! I just would like to give a huge thumbs up for the great info you have here on this post. I will be coming back to your blog for more soon.
My brother suggested I might like this web site. He was totally right. This post actually made my day. You can not imagine just how much time I had spent for this information! Thanks!
I haven¦t checked in here for a while since I thought it was getting boring, but the last several posts are good quality so I guess I will add you back to my everyday bloglist. You deserve it my friend :)