Here’s how to uninstall Node on your Mac

If you’ve installed Node.js on your Mac to learn how it works and 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.

How to uninstall Node.js 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.js 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 these three steps 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/lib/

/usr/local/share/doc/

/usr/local/share/systemtap/tapset/

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

How to uninstall Node.js if you installed it using Homebrew

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

brew uninstall --force node

That will uninstall Node and all of its components.

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

If you used NVM to install Node, open Terminal and type the following command:

nvm uninstall <version> </version>

Replace <version> </version> with the version number of Node.js you installed. So, for example, if you installed v17.0, you would type:

nvm uninstall v17.0

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.

Unused Apps in Uninstaller module in CleanMyMac X

  1. Open 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 removal 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.