Raspberry Pi - Raspbian-Update "Jessie" to "Stretch"

Raspberry Pi – Raspbian-Update “Jessie” to “Stretch”

Select language: Deutsch English

Since August 17,2017 the new Rasbian version “Stretch”based on Debian 9 is available for download. If you don’t want to wait long and want to benefit directly from new kernel and software versions, you can upgrade to Raspbian “Stretch” in a few easy steps. The upgrade process takes some time and therefore requires some patience.

 


Difficulty level:


 

Step 1: Check available disk space

In order to update to Raspbian Stretch, there must be enough space on the SD card. Therefore you should check the available and used disk space usage first:

$ df -h

 

Step 2: Check package status

You must also check that all packages are in a state that is suitable for upgrade. The following command displays all packages that have the status semi-installed or configuration failed, and those with error status:

$ sudo dpkg --audit
$ sudo dpkg --get-selections | grep hold

 

Step 3: Update system

Before upgrading, the Raspbian should be completely updated:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade

 

Step 4: Modify Release

For upgrading to the new Raspbian version, the package lists must be adapted to the “Stretch” release. To do this, only the word “jessie” has to be replaced by “stretch”. In order not to overlook any position, we simply let the replacement be done by the following command:

$ sudo sed -i /deb/s/jessie/stretch/g /etc/apt/sources.list
$ sudo sed -i /deb/s/jessie/stretch/g /etc/apt/sources.list.d/*.list

 

Step 5: Updating package lists

The new package lists must then be updated and imported:

$ sudo apt-get update

 

Step 6: Update to โ€žStretchโ€œ

Now we are ready to start the upgrade:

$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade

The upgrade process is carried out in two steps: First of all, there is a minimal upgrade to avoid conflicts and then a complete upgrade. The upgrade may take a while depending on your Internet connection. A certain amount of attention is required during the update process, as some configuration files are also updated. Therefore, Raspbian asks several times if you want to replace certain configuration files with a new one. If you have made changes to individual configuration files yourself in the past, you should press D (display differences) or N (not replace) depending on the file, otherwise Y (to replace the old configuration file with a new one).


 

Step 7: Clean up installation

Old, unnecessary packages are removed after the system update with the following commands:

$ sudo apt-get autoremove
$ sudo apt-get autoclean

Finally the Raspberry Pi has to be restarted.

My recommendations were helpful?
Then just say "thank you" with a coffee!

Buy me a coffee


Rate this Post:
1 Star2 Stars3 Stars4 Stars5 Stars
4.82/5 (92 votes)

Raspberry Pi – Raspbian-Update “Jessie” to “Stretch”, 4.82 out of 5 based on 92 ratings
Loading...