
Now we can remove all global packages installed with npm: rm -rf ~/.npmĪfter these commands, Node.js and npm will be fully removed from your system. This command doesn’t touch your home directory, so you can later decide what to do with the rest files. In case you don’t want to manually search for all these folders and files, you can run a single command in a terminal: sudo rm -rf /usr/local/ node.stp in /usr/local/share/systemtap/tapset/.npmrc in your home directory (it’s npm settings, don't delete this if you plan on re-installing Node right away) node, node-debug, and node-gyp in /usr/local/bin.node and/or node_modules in /usr/local/include.node and/or node_modules in /usr/local/lib.List of folders, where Node.js and npm located or store their resources: There is a bunch of folders, they can be removed one by one from the finder or a terminal. If your Node.js was installed differently, it’s not a problem.

The brew will uninstall all installed versions of Node.js.Īfter that, it’s better to run brew cleanup, it will remove all unused dependencies and folders. The Homebrew method is one of the easiest ways to install or uninstall a node on Mac. You are lucky if you installed previous versions with Homebrew.

First things first, we need to uninstall old node versions and everything relative to it.
