In this article I will show you how to completely uninstall node from your Mac OS X. I use macOS Sierra 10.2, but this guide should work on older OS X versions like Yosemite or El Capitan.
To completely uninstall node from OS X remove node-related folders from following locations:
- go to /usr/local/lib and delete any node and node_modules
- go to /usr/local/include and delete any node and node_modules directory
- if you installed with brew install node, then run brew uninstall node in your terminal
- check your Home directory for any local or lib or include folders, and delete any node ornode_modules from there
- go to /usr/local/bin and delete any node executable
source: StackOverlow