Node Version Manager (NVM) is a powerful tool for managing multiple Node.js installations on your system. However, there may be instances when you need to uninstall Node.js to either upgrade to a different version or perform a clean reinstall. This step-by-step guide will walk you through the process of uninstalling Node.js using NVM on macOS.
Know How to Uninstall Node Using NVM and from Mac
Before proceeding with the uninstallation, ensure that you have NVM installed on your system. If you don’t have it installed, you can follow the official instructions on the [NVM GitHub repository](https://github.com/nvm-sh/nvm) to set it up.
Step 1: Open Terminal
Begin by opening the Terminal on your macOS. You can do this by searching for “Terminal” in Spotlight or navigating to “Applications” -> “Utilities” -> “Terminal.”
Step 2: List Installed Node.js Versions
To view the list of Node.js versions installed on your system, use the following command:
Identify the version(s) you want to uninstall.
Step 3: Deactivate Node.js Version
Before uninstalling a specific Node.js version, it’s essential to deactivate it. Replace `<version>` with the actual version number you want to deactivate.
nvm deactivate <version>
Step 4: Uninstall Node.js Version
Now, you can uninstall the deactivated Node.js version using the following command:
nvm uninstall <version>
Repeat steps 3 and 4 for each Node.js version you want to uninstall.
Step 5: Verify Uninstallation
To confirm that the Node.js versions have been successfully uninstalled, run the following command:
You should see a list of remaining Node.js versions without the ones you just uninstalled.
Step 6: Remove NVM
If you wish to remove NVM from your system entirely, you can do so by using the following command:
rm -rf ~/.nvm
Uninstalling Node.js using NVM on macOS is a straightforward process that involves deactivating and uninstalling specific versions. Whether you’re upgrading Node.js or cleaning up your development environment, following these steps shared by hire tech firms will help you manage your Node.js installations effectively.
Remember to check the official NVM documentation for any updates or additional information. Happy coding!