Blog

How to Completely Uninstall Node.js and NPM from MacOS ?

Share your learning

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:

  1. Open the terminal on your MacOS.
  2. 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*
  1. Press Enter and it will ask your MacOS password to confirm.
  2. 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.

Satpal

Recent Posts

How to Switch PHP Versions in XAMPP Easily: Managing Multiple PHP Versions on Ubuntu

Today we are going to learn about managing multiple PHP versions on ubuntu with xampp.…

1 year ago

How to Use Coding to Improve Your Website’s SEO Ranking?

Let's understand about how to use coding to improve your website's SEO. In today’s computerized…

1 year ago

Most Important Linux Commands for Web Developers

Let's understand the most important linux commands for web developers. Linux, as an open-source and…

1 year ago

Top 75+ Laravel Interview Questions Asked by Top MNCs

Today we are going to discuss top 75+ Laravel interview questions asked by top MNCs.Laravel,…

1 year ago

Mailtrap Integration for Email Testing with Laravel 10

Today we will discuss about the Mailtrap integration with laravel 10 .Sending and receiving emails…

1 year ago

Firebase Cloud Messaging (FCM) with Ionic 6: Push Notifications

Today we are going to integrate FCM (Firebase Cloud Messaging) push notifications with ionic application.Firebase…

1 year ago