Upgrading to Debian 8 (Jessie)
Updated by Alex Fornuto
Debian 8 (Jessie) is the most recent version of Debian, released in April 2015. This guide explains how to upgrade your system from Debian 7 (Wheezy) to Debian 8.
Bear in mind that while package and distribution maintainers try to ensure cross-compatibility and problem-free upgrades, there is always the lingering possiblity of something not working out as planned. This is one reason why backing up your data is so important.
If you use the Apache web server, be aware that Debian 8 moves from Apache 2.2 to 2.4. This version change requires several adjustments to configuration files, and can break an existing website. Please follow our Upgrading Apache guide before continuing.
Preparing to Upgrade
Prepare your Linode for Debian 8 by installing updates, backing up your Linode, checking your kernel, stopping services, and starting a screen session.
Installing Available Updates
You should install all available updates for Debian 7 before upgrading to Debian 8.
sudo apt-get update && sudo apt-get upgrade -y
Backing Up Your Linode
It’s a good idea to back up your Linode before performing a major upgrade. If you subscribe to the Linode Backup Service, we recommend that you take a manual snapshot before upgrading to Debian 8. If you use another backup service or application, we recommend that you make a manual backup now. You may also want to back up your configuration files (usually located in
/etc/) in case they have changed in later versions of the software you are using. See our backup guides for more information.
Checking Your Kernel
Verify that your Linode is using the latest supported kernel. See Applying Kernel Updates for more information.
We recommend that you stop as many services as possible before upgrading to Debian 8. This includes web server daemons (Apache and nginx), database servers (PostgreSQL and MySQL), and any other non-critical services. To stop a service, enter the following command, replacing
apache2 with the name of the service you want to stop:
sudo service apache2 stop
Starting a Screen Session
To ensure that the updates will continue to install in the unlikely event you are disconnected from the Linode during the upgrade process, go through the upgrade process in a screen session.
sudo apt-get install screen
Start a screen session:
If you are disconnected from your server, you can reconnect to the screen session by entering the following command:
You are now ready to install Debian 8 on your Linode.
Upgrading to Debian 8
/etc/apt/sources.listfile and change all instances of
jessie. Once you have finished, your
/etc/apt/sources.listshould resemble the following:
1 2 3 4 5 6 7 8 9
deb http://ftp.us.debian.org/debian/ jessie main deb-src http://ftp.us.debian.org/debian/ jessie main deb http://security.debian.org/ jessie/updates main deb-src http://security.debian.org/ jessie/updates main # jessie-updates, previously known as 'volatile' deb http://ftp.us.debian.org/debian/ jessie-updates main deb-src http://ftp.us.debian.org/debian/ jessie-updates main
/etc/apt/sources.list.dfor additional package repositories, and ensure that they are querying for packages from
jessie. You will need to check with the maintainers of each package to ensure that their own repositories have been updated.
Update your package lists:
sudo apt-get update
Grab the latest versions of key system utilities:
sudo apt-get install apt dpkg aptitude
Upgrade your system by entering the following command. The upgrade will download and install numerous packages. This step may take a while to complete:
sudo apt-get dist-upgrade
Services using “NSS” (Network Security Services) and “PAM” (Pluggable Authentication Modules) will need to be restarted. In most cases the default list of services to be restarted is fine. If you have additional services that you run that use NSS or PAM, please add them to the list.
During the upgrade process, configuration files that you’ve modified and require updates will be presented for manual review. Here’s an example:
1 2 3 4 5 6 7
Configuration file '/etc/mysql/my.cnf' ==> Modified (by you or by a script) since installation. ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions
Reboot your system using the Linode Manager to make sure that there were no problems during the upgrade. While your system reboots, you can watch your Linode’s console for errors using the AJAX terminal or Lish.
Your Linode is now running Debian 8!
Errors about packages that are removed and not purged may be resolved by installing the latest version of the software or purging the old package. For example, if you receive an error about MySQL, you could try to resolve the issue by entering the following command:
apt-get install mysql-server
If the above step does not work for the package you are trying to install, you may purge the package with the following command after ensuring that you have a backup of the program’s data and configuration:
apt-get remove --purge mysql-server
This guide is published under a CC BY-ND 4.0 license.