Mac References
How to Completely Uninstall MongoDB from Linux?
How to Quickly to Install MongoDB on MacOS
How To Install Node JS on Mac OS?
How To Uninstall Node JS and (NPM) from MacOS?
Build Node.js, MongoDB, Express RESTful API From Scratch
Node Js Google Places API Autocomplete Address Search Tutorial
Solving node is not recognized as an internal or external command
Access the Root Directory in Mac OS X in 4 Ways Quickly
Set the Path Bar to be Relative to Home Directory in Mac OS X Finder
Method 01
Go to MacOS Terminal
You can check out the Node installation in mac by using the below command. It will show node js version installed in your device.
# node -v
# v10.15.3
Open the terminal and enter the given below command to know your current directory.
# pwd
Go to your root directory.
# cd /
Then enter into the usr directory by using following command.
# cd usr
Go to locale directory.
# cd local
Enter into include folder by using given below command.
# cd include
Now if you enter the ls command then you’ll see thenode folder inside the include folder like given below.
# Digambers-MacBook-Pro:include digambersingh$ ls
# node
We have to remove this node folder to completely uninstall the Node js from MacOS.
# sudo rm -R node
Remove node_modules from MacOS
In next step we have to completely remove node_modules from our system.
Follow the steps
Enter the below command to go back to previous folder.
# cd ..
Go to lib directory, hit the below command to enter into the lib directory.
# cd lib
Use the below command to remove the node_modules (NPM) folder.
# sudo rm -R node_modules
Enter the below command to come out from the directory.
# cd ..
Go to bin folder using below command.
# cd bin
Here you also have to delete the node folder to uninstall the Node js completely.
Enter the below command to remove the Node js from MacOS.
# sudo rm -R node
Finally, we’ve successfully uninstalled the Node JS from MacOS, use the given below command to check whether the Node and NPM completely removed from our system.
# node -v
We have completed our task if you are getting below output.
# -bash: node: command not found
How To Uninstall Node JS and (NPM) from MacOS?
Method 2
How to Uninstall Node.js from Mac OSX
1.Manually – How to completely uninstall Node.js from MacOS
2.Homebrew
3.NVM
4.Phantom Installs
brew uninstall node brew uninstall --force node brew cleanup brew info node
To find Node Installed location
which node
/Users/veena/.nvm/versions/node/v15.6.0/bin/node
cd /
cd Users
cd veena
cd .nvm
nvm ls
nvm uninstall v15.6.0
# Error : nvm: Cannot uninstall currently-active node version, v15.6.0 (inferred from v15.6.0).
Solution :
nvm deactivate Out Put /Users/veena/.nvm/*/bin removed from $PATH /Users/veena/.nvm/*/share/man removed from $MANPATH nvm uninstall v15.6.0
You can also check to see if you have a .nvm folder.
ls -a | grep .nvm
Download the nvm install script via cURL: curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash Ensure that nvm was installed correctly with nvm --version, which should return the version of nvm installed. Install the version of Node.js you want Install the latest version with nvm install node Use the latest version with nvm use node Install the latest LTS version with nvm install --lts Use the latest LTS verison with nvm use --lts
NPM: Install Specific Version of a Package
How to Install Node.js on Ubuntu
How To Completely Uninstall Apps On Mac | Don’t Leave Pieces Behind | A Quick & Easy Guide