Node.js is an open-source runtime environment used by developers to create networked programs and web servers. The way to install Node.js on a Mac is differently than the regular method for installing applications on the system. Therefore, when you need to uninstall Node.js, you might be confused. That’s why we’ve prepared a step-by-step guide explaining how to uninstall Node on a Mac.
Contents:
- Where is Node installed on your Mac?
- How to check what version of Node you have
- How to uninstall Node.js from a Mac
- How to quickly uninstall apps from a Mac
The quickest way to uninstall any application on a Mac
You can find those leftover files manually; however, you can also use a special utility called App Cleaner & Uninstaller from Nektony, which automatically finds all the service files each application has left on your Mac and helps you uninstall the programs completely without leaving a single file behind. You can try the application for free.
App Cleaner & Uninstaller
Video Guide: Deleting Node on a Mac
Where is Node installed on your Mac?
To uncover where Node.js is installed on a Mac, first, you should try to remember how you installed it. Depending on that, Node’s files can be stored in different locations on your Mac.
If you downloaded the installer file from the Nodejs.org official website, you should look for the software support files in the following locations:
- /usr/local/bin
- /usr/local/lib
- /usr/local/include
- /usr/local/lib/dtrace
- /usr/local/share/doc
- /usr/local/share/man/man1
- /usr/local/systemtap/tapset
How to check what version of Node you have
You will need the Terminal command line to check the version of Node you have on your Mac. Follow these steps:
- Open the Terminal from Launchpad or the Applications folder.
- Copy and paste the following commands into the Terminal window:
- node -v
- npm -v
- You will then see which Node version is installed on your system.
How to uninstall Node.js from a Mac
The steps to remove Node.js from your Mac again depend on how you installed it. You can also delete Node.js on Mac using the Terminal command line or manually find and remove its files from your computer.
Here’s how to uninstall Node on Mac that was installed using Homebrew
- Open Terminal from Launchpad or the Applications folder.
- Run the following command in Terminal:
- The system will remove Node and all of its support files.
brew uninstall –force node
How to uninstall Node installed using NVM
- Launch Terminal.
- Type the following command and press Enter (Return).
nvm uninstall v.16.15.0
Note: You need to type the Node version number used on your Mac. Above, you can find the guide on how to check the version.
Uninstalling Node.js from your Mac manually
For this method, you will need to manually find and remove all files associated with Node. Here is how:
- Open Finder.
- Press the Cmd+Shift+G shortcut.
- In the search field, type /usr/local/lib and press Enter.
- Finder will show this location. Find the files or folder with Node in their names and move them into the Trash.
- Go also to the locations listed below and remove all node and node_modules from there:
- /usr/local/include/node
- /usr/local/include/node_modules
- /usr/local/lib/node
- /usr/local/lib/node_modules
- /usr/local/bin/node
- /usr/local/bin/node_modules
- /usr/local/bin/node-gyp
- /usr/local/share/man/man1/npm
- /usr/local/lib/dtrace/node.d
- /opt/local/bin/ node
- /opt/local/include/node
- /opt/local/lib/node_modules
- /usr/local/share/doc/node
- /usr/local/share/systemtap/tapset/node.stp
- Remove the following files from the Home directory:
- .npmrc
- .npm
- .node-gyp
- .node_repl_history
Note that Node may have more or less support files depending on the software version you have.
Once you remove all of Node’s files, empty your Trash and restart your system. Node.js will be completely uninstalled from your Mac.
How to quickly uninstall apps from a Mac
Just like Node, every application creates support files to ensure its proper performance. To completely uninstall any application from Mac, you also have to remove all of its temporary files. By default, they should be stored in the Library folder. However, applications sometimes spread their files all over your disk.
That’s why we’re introducing App Cleaner & Uninstaller. It is software that helps you uninstall applications from your Mac completely and safely with a few clicks. Here’s how to uninstall Node using App Cleaner & Uninstaller:
- Download and launch App Cleaner & Uninstaller.
- Select the programs you want to remove.
- Click the Uninstall button and confirm the action.
App Cleaner & Uninstaller will remove the program entirely, including all of its support files. If you wish to see these service files before removing the app, switch to Expert mode.
Additionally, App Cleaner & Uninstaller finds the leftovers of previously removed apps. To do this, switch to the Remaining Files section, where you will find support files of already uninstalled apps.
We recommend checking your system for unused software programs and useless service files left behind by removed apps so that you can free up space on your disk and optimize your Mac’s performance.
Conclusion
Uninstalling Node.js from a Mac involves a different process than the steps for removing sandboxed applications. This article provided two ways to do this. We also want to remind you that you can use App Cleaner & Uninstaller to wholly and quickly uninstall 1,500+ apps on macOS. You can download a free trial using the button below.