I’m Kayla, and I code for work and for fun. I also break stuff. Then I fix it. Last winter, I had to remove Node.js from three places: my MacBook Pro, my Windows PC, and an Ubuntu box. I wanted a clean slate. New Node. Fresh tools. Fewer weird bugs.
Easy, right? Kind of. But not always.
My short review: removing Node.js is a 3.5 out of 5. It works, but crumbs get left behind. And those crumbs bite.
Let me explain with real examples.
For a detailed checklist and some extra troubleshooting tips, I leaned on this handy write-up over at ImprovingCode.
Why I even did this
- I had Node 14 from an old project.
- I needed 18 for new work.
- My global packages fought each other. Yarn and pnpm were not happy.
- My PATH was a mess. I saw “node: command not found” on one tab and a different Node on another. Yikes.
You know what? Clean beats chaos.
Just like stripping Node.js and every lingering global folder off my machines left them utterly bare, you can explore a more literal take on “going bare” in this gallery of nude pics—it offers high-resolution, tastefully shot images that can provide a quick creative reset before you jump back into debugging.
My MacBook Pro (Homebrew install): pretty smooth, but watch for leftovers
This Mac had Node from Homebrew. So I did the normal thing first: brew uninstall node.
It removed most of it. But a few bits stuck around.
What I found:
which nodestill pointed to a path for a while. I restarted my Terminal and it went away./usr/local/lib/node_moduleshad old global packages (likenpm,yarn, andgulp). I deleted that folder.~/.npmheld cache junk. I wiped it. Felt good.
Pro: fast and simple.
Con: those global folders can hang around and cause weird errors.
If you want a more structured walkthrough for macOS, the folks at MUO cover the full process in their guide.
Tiny tip: run hash -r in your shell, or just open a new Terminal window. Bash and zsh like to remember old paths.
For an end-to-end journal of doing almost the same Homebrew cleanup, I loved the walk-through in this companion post.
My other Mac (nvm install): the easiest one by far
This Mac used nvm. Removing Node was, honestly, lovely.
What I did:
nvm listto see versions.nvm uninstall 18andnvm uninstall 14to yank them out.nvm cache clearbecause I love a tidy house.
I also checked my shell files. I kept the nvm lines in ~/.zshrc, but you can remove them if you’re done with nvm.
Pro: one command per version. Clean.
Con: global packages tied to that version go poof. That’s normal, but still a surprise if you forget.
Side note: when I switched to nvm, I had fewer PATH issues. Worth it.
Windows 11 (official installer): not hard, but the PATH got spicy
On my Windows PC, I used the standard “Apps & features” route.
What I did:
- Open Settings → Apps → Installed apps → Node.js → Uninstall.
- Deleted
C:Program Filesnodejsafter the uninstall finished. It had a couple files left. - Cleaned up
C:UsersMyUserAppDataRoamingnpmandC:UsersMyUserAppDataRoamingnpm-cache. That killed ghostnpxand old CLIs. - Checked the PATH in System Environment Variables. Removed any extra Node paths.
Then I rebooted. I know… but on Windows, it helps.
Pro: the basic uninstall works.
Con: that roaming npm folder can trick you. I once typed npx and it ran, even after uninstall. Not cool.
Extra: when I used Chocolatey once, I ran choco uninstall nodejs and then did the same cleanup above. Same deal.
I’m clearly not the only one who had to redo the process—someone else actually went through three separate uninstalls and wrote about what worked and what didn’t.
Ubuntu server (apt install): fine, unless you built from source
On my Ubuntu box, I had Node from the NodeSource repo.
What I did:
sudo apt remove nodejssudo apt purge nodejssudo rm -rf /usr/local/lib/node_modulesif I saw leftoverswhich nodeandwhereis nodeto confirm it was gone
There’s also a concise tutorial on using the Linux command line to remove Node, if you prefer an external checklist, over at GeeksforGeeks.
One time, I had compiled Node from source (past me was too bold). I had to remove /usr/local/bin/node and /usr/local/bin/npm by hand.
Pro: apt is clear and fast.
Con: source builds are a pain to clean. If you forgot how you installed Node, you’ll spend time hunting.
If you’re primarily on Linux and need a quick sanity check, there’s a concise checklist in this Node-deletion guide.
The weird stuff I ran into
- Ghost
npx: even after uninstall,npxstill worked on Windows. That was from the roamingnpmfolder. Deleting it fixed the issue. - Yarn and pnpm: both kept old links in my PATH. Removing global folders and restarting the shell helped. On Mac, I removed
~/.pnpm-storeand~/.yarn. - VS Code terminals: the PATH inside VS Code sometimes lagged. Closing all VS Code windows and reopening fixed it.
- Volta: on a test machine, I had Node with Volta. I ran
volta uninstall nodeand later deleted~/.voltawhen I was done with it. That was smooth.
What worked best for me (ranked)
- nvm:
nvm uninstall <version>and done. - Homebrew:
brew uninstall node, then delete leftovers. - Windows Apps & features: okay, but check PATH and roaming folders.
- apt: fine, unless you built from source.
Little checklist I now keep
- Figure out how Node was installed first. nvm? brew? installer? apt? Volta?
- Remove Node with that same tool.
- Delete global folders:
- Mac/Linux:
~/.npm,~/.config/yarn,~/.pnpm-store,/usr/local/lib/node_modules - Windows:
%AppData%npm,%AppData%npm-cache
- Mac/Linux:
- Restart the shell (or the whole machine on Windows).
- Run
node -vandnpm -v. They should fail if removed. - If you’ll install again, consider
nvm(Mac/Linux) ornvs/Volta(cross-platform). It keeps things sane.
Need a totally different kind of fresh start while your machine reboots? If you happen to be in East Texas, you can discover new, verified connections on the AdultLook Tyler listings—perfect for lining up an after-hours meet-up as quickly as you reinstall Node, with photos and reviews that make choosing simple.
Final take
Removing Node.js isn’t hard, but it’s not one click either. It leaves crumbs. If you know where they hide, you’re fine. If you don’t, you’ll chase ghosts for an hour. I’ve been there. Twice.
Would I do it again? Yes. But now I write down how I installed it in the first place. Then cleanup is fast. And I stick with a version manager, so next time, it’s one command, a deep breath, and I move on.
If you’re stuck, don’t stress. Check the install path, clean the global folders, and restart the shell. Simple beats clever here.
—Kayla Sox
