Home > How to Tips

A Comprehensive Tutorial on How to Uninstall Node.js on Mac

Updated on Tuesday, August 27, 2024

iBoysoft author Vain Rowe

Written by

Vain Rowe
Professional tech editor

Approved by

Jessica Shee

English Français Deutsch やまと Español Português

Summary: Ever find Node.js comes to be of no use on your device and takes a certain space? Take it easy, this post from iBoysoft is a delicate instruction telling how to uninstall Node.js on a Mac. iBoysoft MagicMenu is the most recommended among all handy solutions with its easy operation.

how to uninstall Node js on a Mac

One day, you find that Node.js has run its course so you plan to completely uninstall it from your device to give other app installation the right of way. However, the associated files like the Application Support folder or app install package that comes with the app are scattered on every bit of your computer, increasing the difficulty of the complete removal.

This article comes to help by teaching you how to completely remove Node.js and NPM from your Mac with its leftovers together. Just be patient to seize such a stepwise instruction.

The Node.js basics you should know

In terms of terminology, Node.js is a single-threaded, open-source, cross-platform runtime environment for building fast and scalable server-side and networking applications. It runs on the V8 JavaScript runtime engine, and it uses event-driven, non-blocking I/O architecture, which makes it efficient and suitable for real-time applications.

Difficult to understand, right? Let me put it simply. Node.js is an environment for executing JavaScript code. It is used extensively for server-side programming, making it possible for developers and programmers to start the use of JavaScript for client-side code without needing to study an additional language.

Whatever how you install Node.js on your device, the fact that the app comes with sorts of files, packages, and extensions is true. Completely uninstalling Node.js takes time and effort, now let's concentrate on how to perform this task efficiently.

If you find this article informative and helpful, why not share it with more people by clicking the Share button below?

 

How to uninstall Node.js on a Mac with iBoysoft MagicMenu?

As aforementioned, an app uninstallation not only matters about removing the program itself but also the caches, preferences files, saved states, and personal modifications that keep the app running. The leftovers of each app are scattered among different folders on your Mac. It is time-consuming and tough for you to find and remove all of them from your Mac machine.

That's why iBoysoft MagicMenu is recommended here. iBoysoft MagicMenu is a right-click enhancer that allows you to remove everything from an unwanted app within a few clicks.

After installing this software, all you need to do is right-click Node.js and then choose Uninstall option. This function exceeds the More to Trash option on the right-click menu, which only moves the app to the Mac Trash but leaves the caches and other associated folders on your machine.

Step 1: Click the Free Download button to install iBoysoft MagicMenu on your Mac.

Step 2: Launch iBoysoft MagicMenu on your Mac.

Step 3: Control-click the Node.js utility and select Uninstall from the dropdown menu.

how to uninstall Node js on a Mac

If you uninstall Node.js from your device completely with no associated files left using this software, please share it with others!

 

How to uninstall Node.js on a Mac with macOS included ways?

If you prefer manual app removal, there are multiple ways included in macOS. It all depends on how you installed the Node.js app previously. Each way will be elaborated with detail, you can give them a try based on your condition.

Method 1: How to uninstall Node.js via Mac Finder?

I can bet uninstalling Node.js via Mac Finder is the most tedious and pesky solution because you have to remove the individual files one by one. Let me show you how to do that:

  1. Launch Finder on your device and tap the Go menu on the top corner of your Mac desktop.
  2. Choose Go to Folder from the dropdown menu and then type in the file path. /usr/local/lib
  3. Hit the Return/Enter key to go to the Node.js folder.how to uninstall Node js on a Mac via Finder
  4. Locate ant files with the word "node" in the name and drag them to the Mac Trash.
  5. Repeat the drag-drop actions for each directory listed below to move associated files of Node.js, and then you're all set.
  • /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/

Method 2: How to remove Node.js with Homebrew?

If you have installed Node.js on your machine using Homebrew, you need to delete it with a Homebrew command line executed in Mac Terminal. Since wrong command lines might damage your Mac, cause data loss, and put your device at risk, please be careful to run command lines in the Terminal.

  1. Launch Terminal on your device with either Spotlight Search or Launchpad.
  2. Type in the following command line in the Terminal window.brew uninstall --force node
  3. Press the Return/Enter key to execute this command line.
  4. Wait for the running process to end, and then you're done.

Method 3: How to uninstall Node.js with Node Version Manager?

If you have downloaded Node.js via Node Version Manager (NVM), uninstalling it with a command line related to NVM is a nice option as well.

Step 1: Open Terminal on your macOS computer.

Step 2: Execute the command line below. Remember to replace the "version" with the version number of Node.js you installed.

nvm uninstall <version> </version>

Be unknown of the version number of the Node.js you installed? No worries. You can check it with Mac Terminal:

Step 1: Open Terminal (or another CLI of your choice).

Step 2: Type the command below:

node -v 

Step 3: Press the Return/Enter key to execute the command line. The returning line will display the Node version number.

Method 4: How to uninstall Node.js with Mac Terminal?

Although we have mentioned Mac Terminal multiple times beforehand, you can still make use of it directly to remove Node.js from your Mac.

  1. Open the Mac Terminal and type in the following command lines in the Terminal window.# sudo rm -rf/usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}
  2. Hit the Return/Enter key to run this command line.

Moreover, you can uninstall Node.js and NPM with this command line:

# rm –rf ~/.npm

Conclusion

NPM is the world's largest software registry and it comes with a Node.js app. This article presents you with 5 handy and effective ways to uninstall Node.js and NPM on Mac, iBoysoft MagicMenu is highly recommended for its simple operation and powerful leftover file-cleaning function. 

If you don't need Node.js any longer, remove it to free up Macintosh HD space for faster running and performance.