npm install lastest node code example Example: how to update node in ubuntu 18.04 sudo npm cache clean -f sudo npm install -g n sudo n stable