Simple, with 5 commands!


Finally, Debian 9 “Stretch” was released in the “stable” branch!

A lot of upgrades, especially in kernel, glibc and other base packages.

Some info from the official wiki (also see the official stretch release notes.):

New features

  • Linux kernel series 4.9, GNU libc 2.24.
  • Desktop environments: GNOME 3.22, KDE Plasma 5.8, MATE 1.16, Xfce 4.12 and others.
  • Programming languages: GCC 6.3, Perl 5.24, Python 3.5, PHP 7.0 and others.
  • nftables is available as a replacement for iptables. See this nftables blog post for details.

Changes

  • The dmesg command requires superuser privileges.
  • The X server is no longer setuid, and may be started without root privileges. If the startx command is run as a non-root user, the Xorg.0.log (or Xorg.*.log for alternative displays) file will be written to ~/.local/share/xorg/ instead of /var/log/.
  • All MySQL packages have been superseded by equivalent MariaDB packages (e.g. mariadb-server-10.1). The mysql-server and default-mysql-server metapackages are transitional, and will bring in the MariaDB server.
  • PHP 7.0 replaces PHP 5.6. There are new metapackages without a version number in them: php-fpm, php-cli, etc. You may use these for future compatibility.
  • Most of the library packages with debugging symbols have been moved to a new repository. If you require these packages, you will need to add an entry to your sources.list or sources.list.d. Also note that the package names are different (ending with -dbgsym instead of -dbg).

How to upgrade?

Before you move on with the upgrade, be sure that your current Debian Jessie was fully updated:

# apt-get update
# apt-get upgrade
# apt-get dist-upgrade

and make a backup of your current sources.list:

cp /etc/apt/sources.list /etc/apt/sources.list_backup

Then, you can start with the upgrade.

First, update the package repository:

sed -i 's/jessie/stretch/g' /etc/apt/sources.list

Then, update package index

# apt-get update

and finally execute the below commands to start the upgrade process:

# apt-get upgrade
# apt-get dist-upgrade

Once the process completes, check your Debian version:

# cat /etc/issue
Debian GNU/Linux 9 n l

That’s all folks!