Skip to main content

NVM CheatSheet for Developers

Basic Syntax of Node Version Manager

CommandDescription
nvm ls-remoteLists all available versions of Node
nvm lsLists all locally installed versions
nvm install nodeInstalls the newest release of Node
nvm install <version>Installs the given release of Node
nvm use <version>Switches and uses the given Node release
nvm which <version>Shows path to the given Node version
nvm currentShows what is the currently used Node version
nvm alias default <version>Sets the default Node version to the given version
nvm unalias <alias_name>Deletes the alias named <alias_name>
nvm --helpShows NVM help documents.
nvm exec <version> node app.jsRun Node app.js with the PATH pointing to given node version
nvm set-colors cgYmWSet text colors to cyan, green, bold yellow, magenta, and white
nvm run <version> app.jsRun app.js using given Node version
nvm install-latest-npmUpdate your version of npm if you use Node installed through nvm
nvm root <path>Set the directory where nvm should store different versions of node.js.
nvm proxy [url]Set a proxy to use for downloads. Leave [url] blank to see the current proxy. Set [url] to "none" to remove the proxy.
nvm -vCheck if nvm is installed
nvm uninstall <version>Un-Install a specific version
nvm lsShow versions available locally
nvm uninstall --ltsUninstall the latest long term support version