$ sudo npm install -g n
$ n --help
Usage: n [options] [COMMAND] [args]
Commands:
n Output versions installed
n latest Install or activate the latest node release
n stable Install or activate the latest stable node release
n <version> Install node <version>
n use <version> [args ...] Execute node <version> with [args ...]
n bin <version> Output bin path for <version>
n rm <version ...> Remove the given version(s)
n prev Revert to the previously activated version
n --latest Output the latest node version available
n --stable Output the latest stable node version available
n ls Output the versions of node available
Options:
-V, --version Output current version of n
-h, --help Display help information
Aliases:
which bin
use as
list ls
- rm
Install n command which can upgrade node.
list all versions
check current version
upgrade latest one