June 30, 2025

How to uninstall Node.js on a Mac

Sergio Tereshchenko
Written by
A content creator with a background in tech support and quality assurance, focused on writing clear, helpful guides for Mac optimization.

Sergio Tereshchenko

Alex Holovchenko
Approved by
The content has been reviewed and approved by our team member, an Apple Certified Support Professional, who provides technical support to Nektony’s users.

Alex Holovchenko

Share

Are you confused about how to remove Node on Mac? 🤔 No stress. We’ve got you covered because our team is pro at uninstalling apps completely on macOS, and Node is no exception.

Keeping in mind that Node is atypical, removing it the wrong way can mess with your dev setup, and a simple drag-to-trash won’t cut it, we’ve got the full uninstall process clearly explained in this guide so you don’t miss a thing, including all hidden leftovers.

Shortcut ahead!

If you’d rather skip the steps and get apps uninstalled with all their leftover files in a flash, App Cleaner & Uninstaller is your best tool. It finds and removes all traces of any app on your Mac from hidden caches and configs to leftover extensions in just a few clicks.

Video Guide: Uninstalling Node on Mac

1:40

youtube button

What is Node.js?

Node.js is an open-source, cross-platform runtime environment that allows you to run JavaScript outside the browser, directly on the server side. Thanks to its ability to handle multiple connections simultaneously with high performance, Node.js is used for building:

  • scalable web applications
  • CLI (Command Line Interface) tools
  • automation scripts
  • real-time chat applications
  • RESTful APIs and microservices
  • streaming services
  • IoT (Internet of Things) solutions

Node often comes bundled with NPM (Node Package Manager), which helps manage scripts, modules, libraries, and project dependencies.

Interesting fact

According to Radixweb’s report, Node.js powers over 6.3 million websites with big names on board like Spotify, Netflix Node.js powers our web applications and helps us scale Netflix to millions of users., PayPal Node.js helps us unify our engineering talent around a single language, JavaScript., GitHub, and more. And no wonder nearly 42.73% of developers rely on Node’s frameworks, libraries, tools, and IDEs for app development.

How to check what version of Node you have

Given how popular Node.js is, it’s likely on your system already. And it’s a good idea to check what version you’re working with. This helps you know exactly what you’re uninstalling, especially if you’ve got multiple versions installed. Here is how you can check Node.js version:

  1. In Finder, go to Applications folder → Utilities → open Terminal.

    Terminal app

    Alternative

    Use Spotlight (Command + Space) → type Terminal → press Return

  2. Copy and paste the following commands and press Return after each one to see which Node version is installed on your system.
    node -v
    npm -v

    Copy

    * Last command refers to the Node Package Manager’s version.

    Terminal window showing Node version

In our case, it is Node.js v.22.16.0 and Node Package Manager 10.9.2 running on macOS Sequoia 15.3.1.

Where is Node installed on your Mac?

There are times when a clean uninstall is necessary, whether you’re debugging, switching versions, or doing a full reset. First step? Find out where it’s installed. To uncover where Node.js is installed on a Mac, first, it’s good to remember how you installed it.

You might’ve installed Node through several methods on macOS, such as Homebrew, the official installer, or NVM (Node Version Manager), all of which affect where Node and its components live on your system.

  1. If you downloaded and installed Node using the official installer from the website, which is often the case, here’s what to look for:

    • /usr/local/bin

      Copy

    • /usr/local/lib

      Copy

    • /usr/local/include

      Copy

    • /usr/local/lib/dtrace

      Copy

    • /usr/local/share/doc

      Copy

    • /usr/local/share/man/man1

      Copy

    • /usr/local/systemtap/tapset

      Copy

    Node support files

  2. If you used NVM to install Node:
    You’ll find its support files in the .nvm hidden folder inside your Home folder. At this point, you may need to show hidden files to see it.
  3. If you installed Node via Homebrew, to check where Node is installed using Homebrew, run in Terminal:

    which node

    Copy

    For your information, Node and its associated files typically reside in:

    • Node binary:

      • On Apple Silicon (M1, M2):
        /opt/homebrew/bin/node

        Copy

      • On Intel Macs:
        /usr/local/bin/node

        Copy

    • npm binary:

      • Same directory as Node, e.g.
        /opt/homebrew/bin/npm

        Copy

    • Global Node modules:

      • Apple Silicon:
        /opt/homebrew/lib/node_modules

        Copy

      • Intel:
        /usr/local/lib/node_modules

        Copy

    • Configuration and support files:

      • Binaries:
        /opt/homebrew/bin/

        Copy

        or
        /usr/local/bin/

        Copy

      • Libraries:
        /opt/homebrew/lib/

        Copy

        or
        /usr/local/lib/

        Copy

      • Includes:
        /opt/homebrew/include/

        Copy

        or
        /usr/local/include/

        Copy

How to uninstall Node.js from a Mac

Note:

The way to remove Node.js depends on the way used to install it on a Mac.

👉 That’s because each method, whether it’s Homebrew, NVM, or the official installer, stores files in different places and requires a different removal approach.

How to remove Node with Homebrew

If Homebrew was your install method (for example, you ran brew install node), here’s how to remove Node.js:

  1. In Finder, go to Applications folder → UtilitiesTerminal.
  2. Copy and paste the following command and press Return:
    brew uninstall node

    Copy

    Terminal window showing a command to uninstall Node
  3. Delete leftovers by entering the following command:
    brew cleanup

    Copy

  4. Confirm the removal by running:
    which node
    which npm
    node -v
    npm -v

    Copy

If the Terminal shows the Node and/or NPM version, it just means there’s another copy on your system or another installation method was used, in which case see the next methods. In case the Terminal doesn’t return a version, Node.js has been successfully removed.

💡Extra tip:

To make sure every trace of Node is gone, make one last check using the step 5 from the manual method of deleting Node.

How to delete Node with NVM

If you installed Node using NVM, you should proceed with uninstalling it the same way. This helps avoid interfering with other versions or dev environment settings. Here’s the right way to uninstall it cleanly:

  1. Open Terminal.
  2. Check the Node version. For this enter this command and press Return:
    node -v

    Copy

  3. Delete Node by entering the following command and specifying your version:
    nvm uninstall <version>

    Copy

    For example, nvm uninstall 22.16.0 Terminal window showing a command to delete Node
  4. Make sure Node is uninstalled by using this command:
    which node
    which npm
    node -v
    npm -v

    Copy

No version and/or directory result is expected, which means Node.js has been fully removed from your system.

How to uninstall Node manually with Finder

If you went with the official installer or simply want Node completely off your Mac, you’ll need to manually delete all related files and folders, but be cautious to avoid deleting anything system-critical.

That’s why we’ve done thorough research and listed all the possible file paths where Node.js and its support files may be hiding. Follow the steps below to safely remove everything:

  1. Open Finder.
  2. Press the Cmd+Shift+G.
  3. In the search field, type the following directory and press Return:
    /usr/local/lib

    Copy

  4. Locate any files or folders containing node in the name, and drag them to Trash. node leftover files
  5. Repeat this process for the following locations and remove any Node-related files or folders:

    • Application support & binaries

      /usr/local/include/node

      Copy

      /usr/local/include/node_modules

      Copy

      /usr/local/lib/dtrace/node.d

      Copy

      /usr/local/lib/node_modules

      Copy

      /usr/local/lib/node

      Copy

      /usr/local/bin/node

      Copy

      /usr/local/bin/node-gyp

      Copy

      /usr/local/bin/node_modules

      Copy

      /usr/local/bin/npm

      Copy

      /opt/local/include/node

      Copy

      /opt/local/bin/node

      Copy

      /opt/local/lib/node_modules

      Copy

      /opt/local/lib/node

      Copy

      ~/.npmrc

      Copy

      ~/.npm

      Copy

      ~/.node-gyp

      Copy

      ~/.node_repl_history

      Copy

      ~/.nvm

      Copy

    • Caches

      /private/var/db/receipts/org.nodejs.node.pkg.bom

      Copy

      /private/var/db/receipts/org.nodejs.npm.pkg.bom

      Copy

      /private/var/db/receipts/org.nodejs.node.pkg.plist

      Copy

      /private/var/db/receipts/org.nodejs.npm.pkg.plist

      Copy

    • Shared documentation

      /usr/local/share/doc/node

      Copy

      /usr/local/share/systemtap/tapset/node.stp

      Copy

      /usr/local/share/man/man1/node.1

      Copy

      /usr/local/share/man/man1/npm

      Copy

  6. After removing all of Node’s files, empty Trash.
  7. Shut down and power your Mac back on to ensure all changes take effect and system memory is cleared.

⚠️ Important

Restart won’t work, a full shutdown and power-on cycle is necessary. Restarting won’t fully reset certain environment variables or unload cached binaries that may still linger in memory.

How to remove applications’ leftovers from a Mac

Apps don’t just sit in your Applications folder, they hide support files in various corners of your Mac. And like Node, deleting the app alone doesn’t clear everything out. That’s where App Cleaner & Uninstaller steps in.

By downloading this tool, you get software that scans your system for these leftover files and removes them for good in seconds. After launching the tool, you have to take a little.

Download
for macOS 10.13 and above
App Cleaner & Uninstaller

Here is how it works:

  1. Run the uninstaller.
  2. Select the Remaining Files tab in its sidebar.
  3. Check leftover files in the left panel.
  4. Click the Remove button → confirm the action. Remaining files tab in App Cleaner & Uninstaller

That’s all it takes! Your Mac is now spotless from leftover clutter. Remember, regularly scanning for unused programs and forgotten support files can free up valuable space and protect your Mac from some of the most common reasons that slow your Mac down.

Node.js removal is a bit more complex than usual, but this guide gives you the full picture. Need more help? Just ask in the comments below.

Troubleshooting when removing Node

Uninstalling Node.js can be tricky when errors or conflicts arise, often requiring a full clean uninstall and reinstall. Here’s a rundown of typical issues and how to spot them:

  1. Errors during the npm install

    You might see errors like:

    • npm ERR! code MODULE_NOT_FOUND
    • npm ERR! ENOENT: no such file or directory
    • EACCES or EPERM permission errors (especially when installing global packages)

    Reasons:

    • Corrupted npm cache
    • Incorrect or broken PATH environment variables
    • Global packages installed with sudo, causing permission issues

    Fix:

    Try clearing the npm cache with npm cache clean –force and avoid using sudo for package installs. Also, check your PATH settings to ensure npm directories are included.

  2. Conflicts between Homebrew, NVM, and official installations

    If you have installed Node using multiple methods (Homebrew, NVM, or the official installer), the following conflicts can arise:

    • node -v and npm -v show different or unexpected versions
    • Terminal shows errors like node: command not found even if installed
    • Inability to update npm (npm install -g npm fails)

    Reason:

    Multiple installations with different paths can confuse your system.

    Fix:

    Uninstall Node the way you installed it and clean leftover files. Use one installation method consistently going forward.

  3. Global package issues

    You might face errors when running global CLI tools: command not found. Installed global packages (e.g., eslint, create-react-app, nodemon) are not recognized.

    Reasons:

    • Global npm packages installed in directories not in your $PATH
    • Using sudo to install global packages, which can block updates or removal
    • Corrupted config files like .npmrc or package-lock.json

    Fix:

    Ensure global npm directories are added to your PATH. Avoid sudo installs and try reinstalling problematic packages.

  4. node-gyp errors when installing dependencies

    • gyp: No Xcode or CLT version detected!
    • node-gyp rebuild fails

    Reasons:

    • You don’t have the Xcode CLI tools installed
    • Your Node version isn’t compatible with your macOS version

    Fix:

    Install CLI tools by running xcode-select –install. If the problem persists, check Node’s compatibility with your macOS version.

  5. Broken NVM or .nvmrc

    You might find nvm commands fail or Node versions don’t switch as expected.

    Issues:

    • nvm: command not found error arises when trying to switch Node versions
    • Node version not switching between projects
    • zsh or bash not loading NVM automatically

    Reasons:

    • NVM isn’t properly set up in your shell configuration files (.zshrc, .bash_profile)
    • the NVM directory is corrupted

    Fix:

    Open Terminal and use this command to add the following to your shell config file:

    export NVM_DIR="$HOME/.nvm"
    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

    Copy

    Then restart your Terminal or run source ~/.zshrc / source ~/.bash_profile.

Final lines

To wrap up, even though Node.js can be uninstalled only through the same method it was originally installed, knowing where its files live and how to remove every trace gives you full control over your development environment

And if you want to put your flow to a new automated level, tools like App Cleaner & Uninstaller can take care of +1000 apps and hidden leftovers in just a few clicks. Contact us and find out how the app can benefit your Mac.

Frequently asked questions

Can I reinstall Node.js after uninstalling it?

Yes, and here’s how:

  1. Open Terminal.
  2. Choose your installation method:

    • For the official version: Go to nodejs.org and download the macOS installer.
    • For Homebrew: Run brew install node.
    • For NVM: Run nvm install node.
  3. Verify installation by typing:

    node -v
    npm -v

    Copy

  4. Make sure node and npm both return valid version numbers.

How do I choose the best way to uninstall Node on Mac?

It depends on how Node was installed:

  1. If installed via Homebrew:

    • Run brew uninstall node in Terminal.
    • Then run brew cleanup.
  2. If installed via NVM:

    • Run nvm uninstall <version> in Terminal.
    • Clean up your .nvm folder if needed.
  3. If installed via the official package:

  4. Use a tool like App Cleaner & Uninstaller to remove any hidden leftovers automatically.

How do I manually uninstall Node.js?

  1. Open Finder.
  2. Press Cmd + Shift + G and go to each of the following paths:

    /usr/local/bin/

    Copy

    /usr/local/lib/

    Copy

    /usr/local/include/

    Copy

    ~/.npm, ~/.nvm, ~/.node-gyp

    Copy

  3. Delete any files or folders that contain node, npm, or are clearly related.
  4. Empty Trash.
  5. Shut down and power your Mac back on to clear memory and unload cached files.

How do I remove leftover application files after uninstalling Node?

  1. Open Finder.
  2. Press Cmd + Shift + G and go to each of the following paths:

    /usr/local/bin/

    Copy

    /usr/local/lib/

    Copy

    /usr/local/include/

    Copy

    ~/.npm, ~/.nvm, ~/.node-gyp

    Copy

Alternative: Use a special tool App Cleaner & Uninstaller.

  1. Select the Remaining Files tab in its sidebar.
  2. Check leftover files in the left panel.
  3. Click the Remove button → confirm the action.

How to check if Node.js is entirely uninstalled from a Mac?

Use the Terminal command line:

  1. Open Terminal.
  2. Type this command and press Return.
    node -v

    Copy

  3. If you see the “Command not found” message, Node.js is removed from your Mac.
Scroll to Top