What is the best way of upgrade Stretch (not the homeassistant)

I had this issue before… ive always tried not to upgrade my PI using sudo apt-get update and apt-get upgrade but once in a while you do kinda the missed up so this is my issue

If i do a fresh install of hassbian image… everything works right out of the box… no problem
but when i upgrade using sudo apt-get update and sudo apt-get upgrade my whole system get all weird… i loose all my GPIO switches… it only happen when i do sudo apt-get update and sudo apt-get upgrade which is upgrading the whole PI

i can get by using

$ sudo systemctl stop [email protected]
$ sudo su -s /bin/bash homeassistant
$ source /srv/homeassistant/bin/activate
$ pip3 install --upgrade homeassistant
$ exit
$ sudo systemctl start [email protected]

but sometimes accident happen lol… any tip or a work around to disable sudo apt-get upgrade

How many times do you need to ask the same question on different posts?

Don’t type it in…

1 Like

sorry i was looking for it i thought i wasnt able to post it

i tried… haven’t in the last 8 months … to but sometimes i get confused between sudo apt update and upgrade

If you’re not doing upgrade, you don’t need to update. Update updates the list of software before you upgrade. If you don’t want to upgrade, don’t do either.

I dont need even if I’m installing other package?

Sorry, I presumed you were only using the device for homeassistant.

Yes, you’ll want to update before installing other packages.

You’re just going to have to learnt he difference and type the correct commands tbh. Plus, upgrade will ask for confirmation before upgrading any packages, so you could always say No.

why would you NOT want to upgrade to get security patches and bug fixes? This seems counter intuitive to me.

sudo apt-get update merely grabs the latest ‘pointers’ to installed software to tell the system what the newer versions will be.

sudo apt-get upgrade will actually upgrade things.

I am going to guess that you got bit one time with a bug during an upgrade, lost your GPIO, and never wanted to upgrade again. I bet they fixed the bug immediately, but you were too afraid to try it again after being burned once. I have been using pi’s for YEARS, and never NOT upgraded them. You should always upgrade your system if it connects to the internet.

thank you … i guess will try my best not to upgrade

i would like to always upgrade… like i said everytime i do that i loss my GPIO swtiches… so i only upgrade my Homeassistant not the PI it self…