How to Upgrade Jessie to Stretch

Try it in our public cloud & Get $5 Credit

How to Upgrade Jessie to Stretch

Debian is an operating system similar to Unix-based systems, which is open source and maintained by multiple active users. However, when major changes are made to the source code and a new, stable release comes out, it’s provided a codename. The previous stable release, Debian 8, was named Jessie, while the newest stable release of Debian 9 is named Stretch. Each major update typically provides new package availability, changes to software, and other necessary updates. Additionally, Debian receives stable updates every two years, and each stable release typically receives support for three years.

Debian 9 Stretch

Getting Started

Before we can proceed with upgrading to Debian 9, Stretch, the current stable release, you will need a node hosting a Linux Debian 8, Jessie, instance. The node you choose should be hosted on a cloud server or dedicated server, whichever you prefer.

Before proceeding with the installation, there’s one major change from Debian 8 to Debian 9. In Debian 9, MariaDB is replacing MySQL, which was the default. With this new release, MariaDB is now the default SQL-based system, and previously existing instances of MySQL will be replaced by the equivalent MariaDB instance.

Additionally, when the upgrade is complete, you will need to confirm the functionality of any third party applications. Changes to a release can render some services non-functional due to compatibility issues.

Upgrade Jessie to Stretch

The first step in this update is to make sure your system is making sure your current node is completely upgraded, any relevant and necessary updates installed, and then freshly rebooted:
apt-get update
apt-get upgrade
apt-get dist-upgrade

Before continuing, it’s vital that an update of your Debian 8 machine or virtual machine is created. Once the upgrade has completed, it will not be possible to revert from Debian 9 to Debian 8.

After creating your backup, check the database for consistency, making sure there is no hold on the system package. A packaged hold cannot be upgraded, which will lead to system instability or a failure to boot:
dpkg -C
apt-mark showhold

Once confirming the system package is available, the package repository should be backed up and then updated:
cp /etc/apt/sources.list /etc/apt/sources.list_backup

Now let’s update your package repository from the previous stable release to the newest stable release:
sed -i 's/jessie/stretch/g' /etc/apt/sources.list

After pulling the newest stable release repository, it’s time to update your existing package with the new release repository:
apt-get update

It’s time to run your upgrade. When you run this upgrade, the system will prompt you, asking if you would like to restart the service automatically:
apt-get upgrade
apt-get dist-upgrade

Once complete, it’s time to reboot your system:

Onto your last step! Access your system information and confirm that the most recent, stable release is installed:
cat /etc/*release


Congratulations! You’ve successfully updated your cloud server or dedicated server node to the recent, stable Debian release, Debian 9. During this process, you’ve updated packages, made a backup just in case, and replaced your previous stable release, Jessie, with Stretch. If you found this guide helpful, please share it with other users working through the same process.