This Script does all the steps for upgrading via clicking on the Copy to clipboard button and pasting in your SSH while logged into your Home Assistant, it may stop on the system upgrade depending on what is updated simply paste it again to run through it again.
-
This is intended for Venv installs not sure if it will work for other installs.
-
Back up your Home assistant configuration files before proceeding.
-
This will reboot the System after it updates your Home Assistant so verify Breaking Changes are addressed first or you could break your system.
sudo apt update
sudo apt upgrade -y
sudo apt autoremove -y
sudo -u homeassistant -H -s
source /srv/homeassistant/bin/activate
pip3 install --upgrade homeassistant
exit
sudo reboot