先确认你的系统类型

Debian 常规系统的更新
sudo apt updatesudo apt upgrade(如需处理依赖变化更稳妥,可用 sudo apt full-upgrade,旧版也常用 sudo apt-get dist-upgrade)sudo apt autoremovesudo apt update && sudo apt full-upgrade && sudo apt autoremovesudo apt update && sudo apt full-upgradesudo apt update && sudo apt full-upgradesudo rebootsudo apt install unattended-upgradessudo dpkg-reconfigure unattended-upgrades(选择 Yes)systemctl status apt-daily.timer apt-daily-upgrade.timersudo unattended-upgrade --dry-run;查看 /var/log/unattended-upgrades/unattended-upgrades.log以上命令适用于Debian 稳定版的日常更新与升级场景。LFS 的更新思路
ldconfig,必要时重启相关服务或系统。Debootstrap/Chroot 环境的更新
sudo apt update && sudo apt full-upgrade && sudo apt autoremoveexit;如为 systemd-nspawn:machinectl reboot <name>;如为 chroot:reboot(宿主机执行)