I deleted Node.js on my machines. Here’s what actually worked.

I love Node.js. I build little tools, test APIs, and mess with hobby apps (I even built three full e-commerce stores with it—here’s my honest take). But sometimes you need a clean slate. I had to remove Node.js twice this year—once on my MacBook, and once on a Windows desktop at my studio. It sounded simple. It wasn’t always simple. But it’s doable.

Here’s what I did, what broke, and what I’d do again.


Quick story first

Why remove it at all? I had version clashes. One client used 18, another used 20. My global packages got weird. You know what? I just wanted a clean cut and a calm console.

Short version:

  • Homebrew made my Mac easy.
  • Windows uninstalled fine, but PATH got sneaky.
  • NVM was my favorite way to manage versions.
  • Manual removal works, but it’s fussy.

Quick aside: for a deeper cleanup checklist that complements the steps below, check out Improving Code for an excellent walkthrough. You can follow the full play-by-play in this dedicated guide.


My MacBook: Homebrew made it feel tidy

This was my main machine (Apple Silicon). I had installed Node.js with Homebrew. Brew did most of the heavy lifting. If you're after an external walkthrough, the BrowserStack guide on removing Node with Homebrew covers the essentials as well.

What I ran:

  • brew list | grep node (just to see it)
  • brew uninstall node (or brew uninstall node@18, if versioned)
  • brew cleanup
  • node -v (should fail or say not found)
  • which node (should show nothing)

One hiccup: my global npm folder stayed around. npm kept pointing to an old path. I cleaned it by removing my global folder.

  • npm root -g (note the path)
  • Then I deleted that folder. On my Mac it lived under /opt/homebrew/lib/node_modules.

If you installed Node.js from the .pkg file (not Brew), I’ve done that clean too. I had to delete the files by hand:

  • /usr/local/bin/node
  • /usr/local/bin/npm and /usr/local/bin/npx
  • /usr/local/include/node
  • /usr/local/lib/node_modules
  • /usr/local/share/man/man1/node.1
  • On Apple Silicon, also check /opt/homebrew/... paths

After that, node -v should be gone. If it still shows, your shell might be caching. I closed Terminal and opened it again.


NVM saved my sanity (Mac and Linux)

Honestly, this is the way. I keep multiple Node versions without nuking my setup. When I needed to remove a version, I ran:

  • nvm ls (see what’s installed)
  • nvm uninstall 18 (or whatever version)
  • nvm alias default 20 (set a default)
  • If I wanted a true clean: remove NVM itself by deleting ~/.nvm and removing the NVM lines in .zshrc or .bashrc.

It felt safe. No stray files. No mystery paths. No drama.


Windows: the sneaky PATH thing

On my studio PC, I removed Node.js through Settings. It worked fine, but it left crumbs. I also cross-checked my process against a thorough GeeksforGeeks tutorial on completely removing Node.js from Windows—handy for spotting stray files.

What I did:

  • Settings > Apps > Installed Apps > Node.js > Uninstall
  • Closed VS Code and terminals (this matters)
  • Removed leftovers:
    • C:Program Filesnodejs
    • C:Users<me>AppDataRoamingnpm
    • C:Users<me>AppDataRoamingnpm-cache
  • Then I fixed PATH:
    • Search “Environment Variables”
    • Edit PATH for my account and for System
    • Remove lines that point to C:Program Filesnodejs or Roamingnpm

Checks I ran:

  • where node
  • node -v
  • npm -v

If you want version control on Windows, nvm-windows or Volta are great. I use nvm-windows on one PC and Volta on another. Both keep things neat.


Linux (Ubuntu) notes from my lab box

I had Node.js from the NodeSource repo. That machine is also where I try out cloud scripts—like importing CSV data to DynamoDB with a TypeScript Lambda. I removed it like this:

  • sudo apt remove nodejs
  • sudo apt purge nodejs
  • sudo rm -rf /usr/lib/node_modules (only if it was created by that install)
  • If I used NodeSource, I also removed the repo:
    • sudo rm /etc/apt/sources.list.d/nodesource.list*
    • sudo apt update

I checked:

  • which node
  • node -v
  • npm -v

Then I went back to NVM on that box. Cleaner life.


Checks I swear by

These quick tests saved me time:

  • node -v and npm -v (should be gone if you removed them)
  • which node (Mac/Linux) or where node (Windows)
  • echo $PATH (Mac/Linux) or echo %PATH% (Windows)
  • npm config get prefix (to find global install folder)

I also ran:

  • npm cache clean --force (when npm acted odd)

One more tip: after big changes, close your shell. Then open a fresh one. I forget this. Then I grumble. Then I remember.


Real snags I hit (and fixed)

  • VS Code held a lock on npm files on Windows. I closed it, then the uninstall worked.
  • Zsh still showed an old Node path. I removed NVM lines in .zshrc, reloaded the shell, and it cleared.
  • Global CLI tools vanished (of course). After a clean install, I reinstalled just what I needed: npm i -g yarn, npm i -g pnpm, or none at all. Less clutter felt nice.

What I’d pick next time

  • If you used Homebrew: use brew uninstall. It’s smooth.
  • If you used a .pkg on Mac: do the manual clean and be thorough.
  • On Windows: uninstall in Apps, then fix PATH, then delete leftovers.
  • For managing versions: NVM (Mac/Linux) or nvm-windows/Volta (Windows). It keeps your head clear.

Why make it hard on yourself? Version managers just work.


Tiny cheat sheet

  • Mac (Homebrew): brew uninstall nodebrew cleanup → check versions
  • Mac (.pkg): delete node, npm, npx, include, lib folders under /usr/local (and maybe /opt/homebrew on Apple Silicon)
  • Windows: Uninstall in Apps → remove C:Program Filesnodejs and Roaming npm folders → clean PATH
  • Linux: apt remove + apt purge → remove NodeSource list if used → switch to NVM

Before you finish Marie-Kondo-ing your dev stack, you might also be in the mood to declutter the rest of your phone. If a few dating installs are gathering digital dust, check out this concise rundown of no-strings-attached options via FuckPal’s guide to the best fuck apps. It ranks the most popular casual-hookup platforms, explains who each one suits, and helps you decide which app (if any) is worth keeping on your home screen.

If your travels ever take you through California’s Central Valley and you’d rather skip generic swipe culture in favor of hyper-local listings, the directory at AdultLook Lemoore provides real-time profiles, photos, and verified contact details so you can quickly connect with providers that match your preference.


Final take

Deleting Node.js isn’t scary. It’s just picky. Paths matter. Tools matter. And yes, one small leftover can make your console act strange.

But once it’s clean, a fresh install feels great. Pick a version manager, set a default, and breathe a little. That’s what I did—and I haven’t cursed at PATH in weeks. Well… almost.