package.json
manage the libraries.Follow the official document.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
..... (simple results)
Check.
$ nvm --version
0.39.0
$ node
Command 'node' not found, but can be installed with:
sudo apt install nodejs
# Current available Node.js on the local machine
nvm ls
# List all available versions
nvm ls-remote
# Use latest version
nvm install node # "node" is an alias for the latest version
nvm use node
# Use speccific version
nvm install 14.0.0
nvm use 14.0.0
# set default version
nvm alias default 15.13.0
Just delete the folder $HOME/.nvm/versions/node/{{ version_you_want_to_delete}}
By default, packages are managed locally (directory with package.json
).
https://docs.npmjs.com/uninstalling-packages-and-dependencies
npm uninstall {{ package_name }}
You can find global packages in $HOME/.nvm/versions/node/lib/node_modules/
.
With -g
option, the npm uninstall
command delete from the directory.
Just remove the directory:
rm -rf ~/.nvm