How to upgrade Hassbian to Stretch


#1

I would like to upgrade Hassbian to Stretch, but I don’t know how to do it correctly.

Should I do this?

sudo hassbian-config upgrade hassbian

Or this?

sudo apt-get -y upgrade

Or neither of them?


#2

This is what I did to update my hassbian to Stretch before I upgraded my Python version to the required version several months ago;

$ sudo apt-get update

$ sudo apt-get upgrade

$ sudo apt-get dist-upgrade

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

$ sudo apt-get update

$ sudo apt-get upgrade

$ sudo apt-get dist-upgrade

$ sudo reboot

I think that is all the steps. I wrote then down at the time I did it so I’m pretty sure it’s complete


#3

I followed these instructions here - worked a treat:
http://baddotrobot.com/blog/2017/10/26/upgrade-raspian-jessie-to-stretch/

If I remember correctly, the this extra step was required:
Run the sed command for each.


#4

Thank you. When I update to stretch, do I need to do anything with home assistant? Or it will just work without any problem?


#5

Just make sure you backup your /config folder and then worst case you just re-image the SD-Card. In your position I would do that instead of upgrading anyway.


#6

Of course, I’ll create an sd-card image :slight_smile:

I’m just asking if some of you did the update, and can confirm if HA it’s working correctly or not :slight_smile:

EDIT: As I read in other post, it seems that remove the old virtual environment and create a new one is required, right?:


#7

The virtual environment defined which version of Python to use.

If you update to stretch you get a new version of Python, so you need to create a new virtual environment to use the new version of Python.