Skip to content

Instantly share code, notes, and snippets.

@tridungle
Forked from suhas-karanth/node_pm2_update.md
Created April 14, 2021 09:25
Show Gist options
  • Save tridungle/794e5722c8745411a6ea519e18914a12 to your computer and use it in GitHub Desktop.
Save tridungle/794e5722c8745411a6ea519e18914a12 to your computer and use it in GitHub Desktop.
Upgrading node and pm2 using nvm

Update node using nvm

nvm install 6.3
nvm alias default 6.3
nvm use 6.3

Install and Update pm2

npm install pm2@latest -g ; pm2 update
sudo update-rc.d -f pm2-init.sh remove [--force]
pm2 startup ubuntu

To switch any saved processes to use new node version

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