In this tutorial, I will help you to Upgrade Debian 9 Stretch from Debian 8 Jessie with simple steps. In this tutorial, all commands are running with the root account. So you must have root user privilege or sudo privileges to complete this. The Desktop users can upgrade it immediately and use the new features, But the users with Debian servers can wait for their production upgrades. First, they should try this on their development environment and then upgrade on production, if everything goes fine.

1. Backup Your Data

The first and very important step is to backup your data. So we strongly recommend you to backup any data which is important for you in existing system. For example, Your Mariadb will be upgraded to version 10.1 and you can’t revert it back. So make sure backup your data to a remote location and after that proceed for upgrade. You may need to backup followings:

Application codebases Databases Configuration files (eg: DNS, Apache, MySQL, PHP, Postgres etc) Emails and email accounts. User accounts details.

2. Upgrade All Packages of Debian 8

Before upgrading to Debian 9, first update all packages of current installed Debian system using the following command.

3. Update sources.list Repository File

Now edit Debian apt configuration file /etc/apt/sources.list and replace all “jessie” with “stretch” to get Debian 9 packages. Use sed command to replace all instances at once as following The /etc/apt/sources.list file will look like below.

4. Update all Packages Again

After replacing all references in the Apt configuration file, Update all the packages on your system again. After that proceed to upgrade distribution.

5. Upgrade Debian 9 (Stretch)

Finally, upgrade Debian 8 distribution to Debian 9 Stretch using the following command. This command will take some time to complete.

6. Verify Upgrade

At this point your system will have upgraded successfully to Debian 8. Lets reboot the instance first and check the version of upgraded system. After rebooting system, Login to serer Verify current version of Debian. Congratulation’s, You have successfully upgraded to Debian 9 “Stretch”. Have fun!