Check the current running version of Node.js:
- node -v
- v4.0.0
Update the package repository to use the latest version of Node.js:
- curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash –
Now upgrade Node.js to the latest version:
- sudo apt install nodejs
Cleanup – You may not need
- sudo apt-get autoremove
Check version of Node.js running
- node -v
- v7.10.o