How to uninstall Node.js with Mac Terminal
Jan 23, 2025
If you installed Node the traditional way and not with Node Version Manager or Homebrew, you can still use Mac Terminal to uninstall it.
- Open Terminal, type in cd /usr/local/include/, and press enter to go to the Node directory.
- Type in the command sudo rm -rf node and click enter to delete the main Node folder. You’ll likely have to enter your password to give permissions.
- Go to the next directory by typing in the command cd /usr/local/lib and pressing enter.
- Delete the node_modules folder by typing in sudo rm -rf node_modules and pressing enter.
- Go to the next directory by typing in cd /usr/local/bin and pressing enter.
- Delete all other associated folders by typing in sudo rm -rf node npm npx and pressing enter.
This process should completely delete Node.js.
Thanks to SetApp by MacPaw