Here’s how to uninstall Node on your Mac

If you’ve installed Node.js on your Mac to learn how it works, experiment using it on a server you run but no longer want it: you should uninstall it. Uninstalling software you don’t use is good practice, as it frees up space and reduces the possibility of its files causing conflicts with other software on your Mac. In this article, I’ll show you how to uninstall node.js.

What is node.js?

First, let’s take a closer look at what node.js is and what it does, just in case you found it lurking on your Mac and do not recall installing it in the first place.

Node.js is a server-side javascript runtime environment that executes javascript instructions on a server and delivers the results to the web browser client. It runs on macOS, Windows, Linux, and other platforms. Some well-known organizations such as Netflix, Microsoft, LinkedIn, and Amazon AWS use it to deliver their online services. It’s built on Google's Chrome V8 JavaScript engine but is open-source and can be downloaded by anyone.

Why uninstall node.js?

As I said, it’s good practice to uninstall any software you no longer use. Why? Because it takes up space and can cause conflicts, especially when it's not updated to the latest available version.

Now it’s important to point out that it’s not enough to simply drag the application binary (the file that sits in your Applications folder) into the Trash and then empty it. That leaves lots of files (or leftovers) scattered around the startup disk and could cause problems in the future.

The good news is that if you have already trashed the application binary without uninstalling it properly, you can still remove the leftovers pretty easily. Let me show you how it’s done.

How to uninstall node on your Mac

There are several ways to uninstall node from your Mac. The best one for you to use depends on how you installed it in the first place. Choose the options that best fit your situation below.

How to uninstall node if you installed it using Homebrew

If you installed node using Homebrew, go to Applications > Utilities and launch Terminal, then type the following command:

brew uninstall --force node

That will uninstall node and all of its components.

How to uninstall node if you installed it with Node Version Manager (NVM)

If you used NVM to install node, launch Terminal and type the following command:

nvm uninstall <version> </version>

Replace ‘’ with the version number of node you installed. So, for example, if you installed v17.0, you would type:

nvm uninstall v17.0

How to uninstall node manually

This one is the most challenging way to uninstall node, as you will have to track down lots of different files and remove them manually one by one.

  • Click on the Finder icon in the Dock, choose the Go menu, and then Go to Folder.
  • Paste the following directory path in the text box: /usr/local/lib
  • Look for files with the name ‘node’ and move them to the Trash.
  • Repeat step 4 for the following directories, pasting each path into the text box in Go to Folder and dragging the files with ‘node’ to the Trash.

/usr/local/bin

/usr/local/include

/usr/local/share/man/man1/

/usr/local/lib/dtrace/

/opt/local/bin/

/opt/local/include/

/opt/local/include/

/usr/local/share/doc/

/usr/local/share/systemtap/tapset/

  • 6. Go to your Home folder and drag the files below to the Trash: .npm; .node-gyp; .nodereplhistory.
  • 7. Empty the Trash

How to uninstall any app easily

As you can see, there are a lot of steps involved in completely uninstalling node.js. The same is true for most applications. If you want to uninstall them manually and thoroughly, you will need to hunt down every file and drag it to the Trash.

However, there is a more effortless way, thanks to a handy application called CleanMyMac X. Among many other valuable tools, CleanMyMac X has an Uninstaller module that takes all the work out of uninstalling apps. You can download it for free here.

Once you’ve downloaded it, follow the steps below to uninstall an application.

  1. Launch CleanMyMac X, and choose Uninstaller.
  2. Locate the application you want to uninstall (tip: you can filter applications by clicking the name of the developer in the middle pane or find them through the search bar).
  3. Check the button next to the application’s name.
  4. Click Uninstall.

How to remove application leftovers

Remember we mentioned earlier that if you have moved an application binary to the Trash, you still need to remove leftovers? Well, you can do that using CleanMyMac X too.

Leftovers in the Uninstaller module of CMMX

  1. Choose the Uninstaller module.
  2. In the middle pane, select Leftovers (the number next to it tells you how many leftover files CleanMyMac X has found).
  3. Check the button next to the leftovers you want to remove in the right pane.
  4. Click Uninstall.

Once the scan is complete, you can rest assured that all app traces are gone from your Mac for good. The app frees up precious space and eliminates the possibility of those files causing a problem in the future.

Node.js is a server-side Javascript runtime environment that you may have installed on your Mac. If you no longer need it or use it, you should uninstall it to free up space and prevent it from conflicting with other software on your Mac. Follow the steps above to uninstall node.js and use CleanMyMac X to remove any leftover files from node or any other application.

Laptop with CleanMyMac
CleanMyMac X

Your Mac. As good as new.