How to Completely Uninstall Node.js and NPM from MacOS ?
Hi there, Today we are going to discuss the process of uninstall Node.js and NPM from your MacOS.
Uninstalling Node.js and NPM is a simple process, but it requires a few steps to completely remove them from your system. In this article, we will guide you through the process of uninstalling Node.js and NPM from your MacOS.
Step 1: Verify the installation of Node.js and NPM
Although, you might have already verified this step that’s why you wanna uninstall them. But, in case you don’t know how to check the node.js and npm installation, you can follow this step.
To verify if Node.js and NPM are installed, open the terminal and type the following command:
node -v
If Node.js is installed on your system, then you will see the version number in the terminal output. Similarly, to check whether NPM is installed or not, enter the following command in the terminal:
npm -v
If NPM is installed, then you will again see the version number in the terminal output.
Step 2: Uninstall Node.js and NPM from MacOS using Terminal
So, as you have confirmed that Node.js and NPM are installed on your MacOS, you can proceed with the uninstallation process. To uninstall Node.js and NPM, follow the steps mentioned below:
- Open the terminal on your MacOS.
- Type the following command to remove Node.js and NPM from your system:
sudo rm -rf /usr/local/{lib/node_modules,bin,node,man}/npm* sudo rm -rf /usr/local/lib/node* sudo rm -rf /usr/local/bin/node* sudo rm -rf /usr/local/share/man/man1/node.1*
- Press Enter and it will ask your MacOS password to confirm.
- Wait for the process to complete.
Step 3: Verify if Node.js and NPM are successfully uninstalled from your MacOS
So, finally the uninstallation process is completed, but it’s important to verify if Node.js and NPM are successfully uninstalled from your MacOS. To verify if Node.js and NPM are uninstalled, open the terminal and type the following commands:
node -v
npm -v
If you see an error message stating that “command not found”, then it means that Node.js and NPM are successfully uninstalled from your system.
Hope this article will help you, see you in the next tutorial.