从 Debian 10 升级到 Debian 11 Bullseye

vps.dance 2022-01-18 2022-10-31 1066℃

整理了下 Debian10 升级到 Debian11 的方法

切到 root (sudo -i), 执行下面的命令

apt update -y && apt upgrade -y; sed -i 's/buster/bullseye/g' /etc/apt/sources.list; sed -i 's/^.* bullseye\/updates .*$//g' /etc/apt/sources.list;
apt update -y && apt upgrade -y && apt full-upgrade -y; apt dist-upgrade -y && apt autoremove -y

执行中, 可能会被询问的问题

  • Continue without installing GRUB?
    Yes
  • What do you want to do about modified configuration file sshd_config?
    Keep the local version currently installed (如果有问)
  • Restart servuces during package upgrades without asking? Yes;
  • 其他问题, 一般默认回车就行了
  • reboot 重启

最终 /etc/apt/sources.list 看起来是这样(也可以直接改成下面的内容)

deb http://deb.debian.org/debian bullseye main
deb-src http://deb.debian.org/debian bullseye main
deb http://security.debian.org/debian-security bullseye-security main
deb-src http://security.debian.org/debian-security bullseye-security main
deb http://deb.debian.org/debian bullseye-updates main
deb-src http://deb.debian.org/debian bullseye-updates main
deb http://deb.debian.org/debian bullseye-backports main
deb-src http://deb.debian.org/debian bullseye-backports main

查看当前Linux版本

cat /etc/os-release
标签: Debian, Bullseye

非特殊说明, 所有文章均为原创.