An Interest In:
Web News this Week
- March 3, 2024
- March 2, 2024
- March 1, 2024
- February 29, 2024
- February 28, 2024
- February 27, 2024
- February 26, 2024
Complete Remove/Uninstall node form mac OS
To remove Node.js from a Mac, follow these steps:
Uninstall Node.js using npm:
npm uninstall -g node
Remove the Node.js executable and the npm modules:
rm /usr/local/bin/node rm -rf /usr/local/lib/node_modules
Remove the Node.js home directory:
rm -rf ~/.npm
Remove the npm and node directories from PATH:
vi ~/.bash_profile
Search for and delete the following lines:
export PATH=$PATH:/usr/local/bin/npm export PATH=$PATH:/usr/local/bin/node
Save and exit the file.
Restart the terminal or run the following command:
source ~/.bash_profile
This should remove Node.js from your Mac. You can verify the uninstallation by running the following command:
node -v
If Node.js is uninstalled, you should see an error message saying that the command is not found.
Remove NVM from MacOS
To remove nvm (Node Version Manager) from your Mac, follow these steps:
Remove the nvm installation directory:
rm -rf ~/.nvm
Remove the nvm configuration from your shell profile:
vi ~/.bash_profile
Search for and delete the following lines:
export NVM_DIR="$HOME/.nvm"[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
Save and exit the file.
Restart the terminal or run the following command:
source ~/.bash_profile
This should remove nvm from your Mac. You can verify the uninstallation by running the following command:
nvm -v
If nvm is uninstalled, you should see an error message saying that the command is not found.
Original Link: https://dev.to/whovishnu/complete-removeuninstall-node-form-mac-os-1kln
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To