Raspbian GNU/Linux upgrade from Jessie to Raspbian Stretch 9 - LinuxConfig.org

The upgrade from Raspbian Jessie to Raspbian 9 Stretch is a relatively simple procedure. However, exercise caution, as there is always a chance to break the entire system. The fewer installed 3rd-party packages and services, the more likely you are able successfully to upgrade your Raspbian Linux system. apt-get update


This is a companion discussion topic for the original entry at https://linuxconfig.org/raspbian-gnu-linux-upgrade-from-jessie-to-raspbian-stretch-9

NOTE: SOME OF THE POSTS BELOW ARE TRANSFERRED FROM LINUXCONFIG DISQUS COMMENTS.

Will

Could the article be updated to include a step to say update the file /etc/apt/sources.list.d/raspi.list? Also, could replace apt-get with apt here.

VP

After following this tutorial I end up with:

sudo apt update
Get:1 http://archive.raspberrypi.org/debian/ jessie InRelease [22.9 kB]
Get:2 http://archive.raspberrypi.org/debian/ jessie/main armhf Packages [172 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ stretch InRelease [15.0 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ stretch/main armhf Packages [11.7 MB]
Fetched 11.9 MB in 14s (807 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
41 packages can be upgraded. Run 'apt list --upgradable' to see them.

As you can see in first line it’s still looking for Jessie. I think there is one more file to edit when upgrading raspbian:

file /etc/apt/sources.list.d/raspi.list
updating first line to: 
deb http://archive.raspberrypi.org/debian/ stretch main ui

Now I can see:

sudo apt update
Get:1 http://archive.raspberrypi.org/debian/ stretch InRelease [25.3 kB]
Get:2 http://archive.raspberrypi.org/debian/ stretch/main armhf Packages [144 kB]
Get:3 http://archive.raspberrypi.org/debian/ stretch/ui armhf Packages [28.2 kB]
Hit:4 http://mirrordirector.raspbian.org/raspbian/ stretch InRelease
Fetched 197 kB in 10s (19.2 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
87 packages can be upgraded. Run 'apt list --upgradable' to see them.

All good. Plus you can see number of packages increased from 41 to 87.

Enjoy

Wil

After update “cat /etc/os-releases” shows still jessie.

Azfar Hashmi

some how I can see some old packages after the upgrade.

ii libdns-export100 1:9.9.5.dfsg-9+deb8u14
ii libgnutls-deb0-28:amd64 3.3.8-6+deb8u7
ii libhogweed2:amd64 2.7.1-5+deb8u2
ii libicu52:amd64 52.1-8+deb8u6
ii libirs-export91 1:9.9.5.dfsg-9+deb8u14
ii libisc-export95 1:9.9.5.dfsg-9+deb8u14
ii libisccfg-export90 1:9.9.5.dfsg-9+deb8u14
ii libnettle4:amd64 2.7.1-5+deb8u2
ii libssl1.0.0:amd64 1.0.1t-1+deb8u7
ii libzip5:amd64 1.3.2-1+0~20171207162429.2+jessie~1.gbp053542

any idea? don’t have any jessie refferecne in source.list.d

I believe I am safe to remove them as I am seeing similar updated packages (from stretch) are also installed (most not all)

Biadosaru

Also worth remembering to do an apt-get autoremove to get rid of the unnecessary old Jessie packages after a successful upgrade.

Juergen Stremmler

After doing the update my Raspbery Pi starts, reboots, starts, reboots…

Anthony Lock

I did the update but something went wrong and I have ended up with a LXDE 9.1 standard desktop instead of Pixel any ideas on how to restore Pixel. Also although wifi works you have to configure it every time and etho is not there despite being plugged into router

bub

Remember to update /etc/apt/sources.list/d/raspi.list too… set “jessie” to “stretch”

Then you will avoid the wifi-problem.

waynewerner -> bub

Found some others in my apt directory. You can do:

grep -Inr jessie /etc/apt/

or

ag jessie /etc/apt

To find all of your files that need some sed action

Robert Rodriguez

I got an error on the update: W: The repository ‘Index of /debian stretch Release’ does not have a Release file.
N: Data from such a repository can’t be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://archive.raspberrypi.org/debian/dists/stretch/main/binary-armhf/Packages 404 Not Found [IP: 93.93.130.214 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

Otherwise the rest of the packages updated successfully, and it boots up ok, but I lost wifi.
Any way to get wifi going again? ifconfig wlan0 and wlan1 shows no devices found.

郡山直大 -> Robert Rodriguez

I upgraded two raspi machines from Jessie to Stretch, and cannot use wifi, so I use ethernet instead of wifi.

hogger -> Robert Rodriguez

Sounds like you changed the /etc/apt/sources.list.d/raspi.list to reflect stretch instead of jessie. I don’t think that repository has been updated for stretch yet. You should only modify the file /etc/apt/sources.list to reflect stretch instead of jessie.

Bluescreen → hogger

It’s ok now. Branch stretch is up.
=> Index of /debian/dists/stretch

Jad

It can also be interesting to run a “rpi-update” for firmware update, kernel and VideoCore lib …

thePhiloSurfer

Successful update :wink: Thank you.

TheDiveO

Could it be that there is an #apt-get update missing after the switching to stretch using sed? As the command sequence above is, #apt-get --simulate upgrade says that there is nothing to be done. After an update, it now sees the many updates to be done.

Anyway, thank you for a concise tutorial on how to upgrade my Raspbian!

Lubos Rendek Mod -> TheDiveO

Yes, you are right! Thanks for bringing this to my attention. This will be updated shortly.