How to upgrade to Debian Linux 9 (stretch)

1. Update all packages currently installed to the latest versions

apt-get update
apt-get upgrade

2. Replace all occurrences of jessie with stretch in the apt sources file /etc/apt/sources.list using your favorite text editor (ex. pico /etc/apt/sources.list).

Here’s an example of what the file could look like after the change:

deb http://ftp.debian.org/debian/ stretch main
deb http://security.debian.org/ stretch/updates main

Alternatively you can use the sed command to replace the reference to the repository:

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

3. Update the apt package index

apt-get update

4. Upgrade all packages

apt-get upgrade
apt-get dist-upgrade

5. Once all packages are upgraded, restart the system

  • install, debian, debian 9, update, upgrade, set
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to install LAMP on Debian 8

Install LAMP on Debian 8. A LAMP stack is a synonym of LAMP server or LAMP web server. It...

How to Install Dotclear on a Debian 8 VPS

  Dotclear is an open source web publishing software written in PHP,...

How to set up a web server (LAMP) on Debian 9 (stretch)

The acronym LAMP refers to a software stack combination of a Linux OS with Apache web server,...

How to Install GitLab Community Edition (CE) 11.x on Debian 9

Since GitHub was acquired by Microsoft, quite a few developers have planned to migrate their...

How to Install PiVPN on Debian

Introduction An easy way to set up a VPN server on Debian is with PiVPN. PiVPN is an installer...