# apt-get update # apt-get upgrade # apt-get dist-upgrade
# sed -i 's/wheezy/jessie/g' /etc/apt/sources.listFor example:
FROM DEBIAN WHEEZY: # cat /etc/apt/sources.list deb http://security.debian.org/ wheezy/updates main deb-src http://security.debian.org/ wheezy/updates main deb http://ftp.at.debian.org/debian/ wheezy main contrib non-free deb-src http://ftp.at.debian.org/debian/ wheezy main contrib non-free TO DEBIAN JESSIE deb http://security.debian.org/ jessie/updates main deb-src http://security.debian.org/ jessie/updates main deb http://ftp.at.debian.org/debian/ jessie main contrib non-free deb-src http://ftp.at.debian.org/debian/ jessie main contrib non-freeAt this stage we are ready to upgrade packages:
# apt-get update # apt-get upgradeDuring the upgrade you may be given an option to manually or automatically restart any currently running services. The recommended strategy is to do manual restart as it provides more flexibility. If you are running SSH service you will be also given an option to disable SSH root access. What it means, that if you opt to "YES" you will no longer be able to SSH login as root user.
# apt-get dist-upgradeAfter the upgrade it is recommended to reboot your system:
# rebootCheck your upgrade:
root@debian:~# hostnamectl Static hostname: debian Icon name: computer-vm Chassis: vm Machine ID: 909d78b4d6cd403bb9cf478d1a3fb18d Boot ID: 17584ebda9d447cc9657fcbced3850d0 Virtualization: oracle Operating System: Debian GNU/Linux 8 (jessie) Kernel: Linux 3.16.0-4-amd64 Architecture: x86-64