sudo npm uninstall npm -g
brew uninstall nodeThen
sudo rm -rf /usr/local/lib/dtrace/node.d /usr/local/lib/node_modules /usr/local/bin/npm /usr/local/bin/nodemon /usr/local/bin/node /usr/local/include/node ~/.npm* ~/.node* /usr/local/share/man/*/node* /usr/local/share/man/*/npm*Which removes the following
/usr/local/lib/dtrace/node.d/usr/local/lib/node_modules/usr/local/bin/npm/usr/local/bin/nodemon/usr/local/bin/node/usr/local/include/node~/.npm*~/.node*/usr/local/share/man/*/node*/usr/local/share/man/*/npm*
I just saved this (along with some of my other public gists) as notes to me. This worked for me with a Mac version a few years ago. Sorry it's not working now. I think I got this information by going around to lots of websites and kind of "averaging" all their best ideas. You might have to do something like that again for modern Mac