debian11升级到debian12
/ 1 min read
第一步: 更新系统到最新
apt updateapt upgrade -yapt dist-upgrade -y第二步: 更新debian12源
cat > /etc/apt/sources.list << EOFdeb https://mirrors.huaweicloud.com/debian/ bookworm main non-free non-free-firmware contribdeb-src https://mirrors.huaweicloud.com/debian/ bookworm main non-free non-free-firmware contribdeb https://mirrors.huaweicloud.com/debian-security/ bookworm-security maindeb-src https://mirrors.huaweicloud.com/debian-security/ bookworm-security maindeb https://mirrors.huaweicloud.com/debian/ bookworm-updates main non-free non-free-firmware contribdeb-src https://mirrors.huaweicloud.com/debian/ bookworm-updates main non-free non-free-firmware contribdeb https://mirrors.huaweicloud.com/debian/ bookworm-backports main non-free non-free-firmware contribdeb-src https://mirrors.huaweicloud.com/debian/ bookworm-backports main non-free non-free-firmware contribEOF第三步: 再次更新系统
apt updateapt upgrade -yapt dist-upgrade -y第四步: 重新启动
reboot第五步: 查看系统版本
lsb_release -a第六步: 删除无用依赖
apt autocleanapt autoremove -y