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>
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. Among many other valuable tools, CleanMyMac has an Uninstaller tool 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.
- Open CleanMyMac and navigate to the Applications module in the left sidebar.
- Click a Scan button for a quick overview of all the applications, updates, and leftovers.
- Once complete, click Manage My Applications, where you’ll find the Uninstaller tool. Select the applications you want to uninstall and check the button next to the application’s name.
- 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, too.
- Once you click on the Applications module in the left sidebar and run a scan, navigate to Manage My Applications.
- Select the Leftovers tool in the sidebar to view residual files categorized under Installers and Leftover Files.
- Simply check the boxes next to the leftovers you want to remove in the right pane.
- Click Remove.
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 to remove any leftover files from Node or any other application.