Node.js is an open-source, cross-platform runtime environment that allows you to run JavaScript code outside a browser. It is commonly used to build web servers, but it can also be used for various other tasks, such as creating real-time applications and streaming data.
There are a few reasons why you might want to uninstall Node.js from your Mac. For example, you may no longer need it for a project you are working on, or you’re experiencing problems with it and might want to reinstall it. Below, we will show you how to uninstall Node.js from your Mac.

How to Uninstall Node.js in macOS
Uninstalling Node.js from your Mac can be done in multiple ways, depending on how you installed it. The options below will depend on your situation, so choose the one that best suits your current installation.
Uninstall Node.js From Your Mac via Homebrew
Homebrew is a third-party package manager that makes it easy toinstall software on your Mac using Terminal. If you had installed Node.js via Hombrew, you can uninstall it by opening the Terminal appusing Spotlight searchand typing in the following command:
This command will uninstall Node.js from your Mac and remove all residual files as well.

Remove Node.js From Your Mac via Node Version Manager
Node Version Manager is a tool that allows you to install and manage multiple versions of Node.js on your computer. This can be useful if you need to use different versions of Node for different projects. You can uninstall Node.js via Node Version Manager by following these steps:
For example, to uninstall Node version 20.6.0, you’d have to run the following command:

This command will remove the specified Node.js version and won’t affect the other installations if there are any.
Delete the Node.js Files Manually
If you’re still facing issues with uninstalling Node.js, you can manually delete the files viaFinder.
To do this, openFinderand selectGo > Go to Folderfrom the menu bar. Then, type in/usr/local/liband press theReturnkey.

Now, look for any files or folders with traces of Node.js in this directory andmove them to Trash. Similarly, go through the following directories and delete any similar files or folders
Next, head over to your user directory by clickingGo > Homefrom the menu bar and delete the following files if they are present.

Finally, empty theTrashfolder, which will permanently remove any traces of Node.js from your Mac.
Start Managing Your Node.js Installations
If you’re a web developer looking for a powerful and reliable platform to build your applications, Node.js is a great option. However, it is important to manage your Node installations as it will help you avoid problems such as conflicts between different versions of Node.js and outdated dependencies.