Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
January 30, 2023 04:45 pm GMT

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

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To