Install the installation package that is installed on the node official website, and install the node with the installation package. You should be able to use the command line to uninstall:
Enter the following command at the terminal:
sudo rm-rf/usr/local/{bin/{node,npm},lib/node_modules/npm,lib/node,share/man/*/node.*}
- Delete all node and node_modules in/usr/local/lib
- Delete all the node and Node_modules folders in the/usr/local/lib
- If you are installing from brew, run brew uninstall node
- Check all the local, LIB, or include folders in ~/to delete all node and node_modules
- In/usr/local/bin, delete all the node's executable files
- Finally run the following code: (There may be a difference in the specific installation path, find ~-name "Node" can be found all
sudo rm /usr/local/bin/npmsudo rm /usr/local/share/man/man1/node.1sudo rm /usr/local/lib/dtrace/node.dsudo rm -rf ~/.npmsudo rm -rf ~/.node-gypsudo rm /opt/local/bin/nodesudo rm /opt/local/include/nodesudo rm -rf /opt/local/lib/node_modules
Nodejs Uninstall under Mac