Managing Node.js versions on Linux is no longer a pain in the ass with NVM (Node Version Manager). It can install different versions of Node.js and NPM on a single machine, switch versions anytime you wish. And the best part is NVM is just a Bash script, truly a lightweight helper for both testing and production.
Downloading binaries from Node.js and updating them manually every now and then is not a pleasant thing to do, and installing Node.js via package manager is usually not a good idea since it's not maintained by the core team and often outdated:
Node Version Manager (v0.39.1)
Note: <version> refers to any version-like string nvm understands. This includes:
- full or partial version numbers, starting with an optional "v" (0.10, v0.1.2, v1)
- default (built-in) aliases: node, stable, unstable, iojs, system
- custom aliases you define with `nvm alias foo`
Any options that produce colorized output should respect the `--no-colors` option.
Usage:
nvm --help Show this message
--no-colors Suppress colored output
nvm --version Print out the installed version of nvm
...
Note:
to remove, delete, or uninstall nvm - just remove the `$NVM_DIR` folder (usually `~/.nvm`)
Output