Mac Tutorials

How to Uninstall Node.js on Mac?

Your time using Node.js has run its course, so you need to remove it from your Mac to make way for something else. As you may know, Node.js is an open-source JavaScript programming environment used by developers to build apps that support multiple requests simultaneously. It’s a great option for data streaming apps and real-time apps.

 

Maybe you want to try something different—perhaps a Node.js alternative like Python or Java. It wouldn’t make sense to keep Node.js installed on your Mac if you won’t use it going forward. Whatever the case is, we’ve got you covered.

 

Before we begin

 

We think of uninstalling files and programs on our computers as a cut-and-dry task—that you manually delete the files, and you’re good to go. While that works, it’s not the most efficient solution. Manually removing files and software from your computer leaves behind pesky files that are easy to miss. Leave it up to a software to do a better job than you ever could.

 

MacKeeper’s Smart Uninstaller goes above and beyond by completely uninstalling apps and programs and their leftover files from your MacBook Pro or MacBook Air. Here’s how to use MacKeeper’s Smart Uninstaller tool:

  1. Download MacKeeper on your MacBook device
  2. Open the app and select Smart Uninstaller on the left
  3. Click Start Scan and wait a few moments while the app scans your Mac for unused apps. MacKeeper will let you know when the scan is complete. If any apps are identified for uninstalling, click Remove Selected. Confirm your decision by clicking Remove
  4. When you delete an app manually, MacKeeper will identify any leftover files and prompt you to delete them. Follow the prompts to remove all traces of that app.

Need a proper guide? Learn how to uninstall apps on Mac. As a start, learn how to delete iTunes from Mac to free up some space if you no longer use it.

 

You can easily uninstall Node.js on your Mac by following our handy guide below. Here’s what to expect:

Let’s get started.

How to remove Node.js from Mac

There are multiple ways to uninstall Node.js on Mac—it all depends on how you installed it.

How to uninstall Node.js manually

This could be the most tedious method of removing Node.js, as you must remove individual files, so follow along carefully.

  1. Open Finder, select Go in the top menu, and choose Go to Folder > Go
  2. Enter “/usr/local/lib” (without quotation marks) in the text box and click Go
  3. Find any files with the word “node” in the name and drag them to the Trash can
  4. Repeat the steps above for each directory listed below, and you’re done.
    • /usr/local/bin
    • /opt/local/bin/
    • /opt/local/lib/
    • /usr/local/lib/dtrace/
    • /opt/local/include/
    • /usr/local/include
    • /usr/local/share/doc/
    • /usr/local/share/man/man1/
    • /usr/local/share/systemtap/tapset/
Open each directory from the list to find and delete Node files manually

Not a fan of Safari? Consider letting it go. Read up on how to delete Safari on Mac.

How to remove Node.js with Homebrew

If you installed Node.js using Homebrew, you’ll have to uninstall it with a Homebrew command in Terminal. This is probably the easiest way to remove Node.js on Mac.

 

Simply bring up Terminal on your Mac and type the following command: “brew uninstall --force node” (omit the quotation marks). That’s it.

Open the Terminal and enter the corresponding command to delete Node files using Homebrew

How to delete Node.js from Mac with Node Version Manager (NVM)

NVM is also another simpler method of removing Node.js on Mac. To do this, enter the command “nvm uninstall [version]” (without quotation marks) in Terminal. (Replace “[version]” with the applicable version. For example, “nvm uninstall v18.16.0”.)

How to check Node.js version on Mac

Not sure what version to enter? Don’t worry, we’re here to help guide you.

 

Determining which Node.js version you’re using is quite simple. To find the Node.js version, all you need to do is install Node.js on your Mac. Here’s how to find the version of Node.js installed on Mac…

  1. Start by downloading Node.js on your Mac device. There are three download options, so ensure you choose the macOS Installer option in the middle (between Windows installer and Source Code)
  2. When Node.js has been downloaded, click on the download file to run the Node.js .pkg installer
  3. Complete the process by following all the prompts on your screen to finish the installation
  4. Once that’s done, Node.js will be saved on your computer
  5. Now, run the command “$ node -v” (omit the quotation marks) to view the version of Node.js installed on your device.

How to uninstall Node.js using Terminal

The final method of deleting Node.js from your system is using a Terminal command line. Here’s how to do it:

  • Open Terminal and run the command:
    • # sudo rm -rf
    • /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}
  • Alternatively, you can delete all global packages installed via NPM by entering the command:
    • # rm –rf ~/.npm

And there you have it; you’ve successfully removed Node.js on your Mac.

Conclusion

The thought of uninstalling Node.js on a Mac can be daunting. Chances are, like many people, you don’t really know where to start or which method to use. As you can see, it can be a tedious process. In fact, you’re probably ditching Node.js for this very reason—maybe you prefer a simpler solution. Whatever the case may be, we’ve simplified the process of deleting Node.js on your Mac. The handy tips and guides in this article should make it easier to achieve this result.

 

No matter which method you go with, remember to use MacKeeper’s Smart Uninstaller tool to thoroughly remove Node.js by ensuring that no leftover files remain behind. After all, your MacBook is better off with no leftover files cluttering it unnecessarily.

Get Robust App

Price starts at $10.95/month

Use your Mac to the fullest! Sign up and get:
Effective tips on how to fix Mac issues
Reliable advice on how to stay safe online
Mac-world news and updates

Thank you!

You’ll love exploring your Mac with us.

Oops, something went wrong.

Try again or reload a page.

Here’s another sign you need to upgrade your macOS ASAP:

30% off your MacKeeper subscription

Сopy the code now and use it in the MacKeeper checkout after the upgrade.

Copy Code

Please be aware that this code cannot be combined with any other discounts, offers, or promotions.

Contents

Unlocked

Delete any app wih all leftovers with MacKeeper’s Smart Uninstaller

Download now
PC

MacKeeper - your all-in-one solution for more space and maximum security.

Try Now

Read more

How to Connect to FTP on Mac?
How to Connect to FTP on Mac?
How to Forget a Wi-Fi Network on Mac?
How to Forget a Wi-Fi Network on Mac?
arrow

Run Application

step_1

Click Continue

step_2

Click Install

step_1

Your macOS version is lower than OS 10.11. We’d like to offer you MacKeeper 4 to solve the cleaning, privacy, and security issues of your macOS.