
Or use the latest version nvm use node Uninstall a Node.js versionįinally, If you want to uninstall a version of Node.js, you can use uninstall subcommand for that.įirst, you need to switch to another version with use then you can uninstall that.

With this subcommand, you can load Node.js by version number or -lts flag. If you want to load a specific version, use use subcommand. Now you install some versions of Node.js on your machine So you can see the list of installed versions with list or ls subcommand. nvm install node Load a specific version of Node.js Or you can install the latest version with node instead of version number. If you want to install the LTS version you can use -lts instead of version number. You can install a specific version by nvm with install subcommand. Install a version of Node.jsįirst, you can get the list of available versions by list-remote or ls-remote subcommand. We want to choose some essential subcommands and explain them. Nvm has a lot of subcommands such as install, use, uninstall, and more. Now you need to close and reopen the terminal to load nvm, then check and verify your installation nvm -version # 0.38.0 "$NVM_DIR/nvm.sh" # This loads nvm bash_completion & \. export NVM_DIR="$HOME/.nvm" # This loads nvm & \. curl -o- | bashĪfter that, the installer will clone the nvm repository into ~/.nvm/ directory and you should add some lines below at the end of ~/.bashrc file to load nvm. So, you can use curl it to download and then run it with bash with the command below in the terminal.

When I wrote this article, the latest version of the nvm installer was 0.38.0. There’s some way to install or update nvm on your machine, but I prefer to install nvm with the installer script. Photo by Ian Dooley on Unsplash Install nvm on Ubuntu and Mac OS
