Skip to content

Instantly share code, notes, and snippets.

@fragolinux
Last active May 6, 2020 07:10
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save fragolinux/412aa50683eb32bb879a120c73110938 to your computer and use it in GitHub Desktop.
Full automatic update of a Debian/Ubuntu Node-Red server
sudo apt-get -y update
sudo apt-get -y install deborphan > /dev/null 2>&1
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
deborphan -sz
sudo apt-get -y autoremove
sudo apt-get -y remove --purge $(deborphan)
sudo apt-get -y clean
sudo chown -R pi.pi ~/.node-red/node_modules
sudo npm -s cache clean
sudo npm -s install -g --unsafe-perm node-red
cd ~/.node-red
sudo npm i -g npm-check-updates
ncu -u
npm install
npm outdated
# npm -s update
npm -s rebuild
cd ~/homeassistant/
source bin/activate
python3.6 -m pip install --upgrade homeassistant
sudo systemctl restart home-assistant@pi.service
@fritserasmus
Copy link

Frago Linux,
In the script you included "homeassistant".
I am not using homeassistant.
Shall I just ignore lines 21 - 24?
My environment:
Node-RED version: v0.18.7
Node.js version: v4.2.6
Ubuntu 16.04.4 LTS

@fragolinux
Copy link
Author

@fritserasmus: just remove last 4 lines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment