Delete and unload node on MAC

Uninstall node
and execute the following script in turn on the terminal

sudo npm uninstall npm -g
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
sudo rm -rf /usr/local/include/node /Users/$USER/.npm
sudo rm /usr/local/bin/node
sudo rm /usr/local/share/man/man1/node.1
sudo rm /usr/local/lib/dtrace/node.d

So let’s verify that one last time

node //command not found
npm //command not found

That’s it.

reference address:
https://www.jianshu.com/p/920961b6a538


Read More: