How To Completely Uninstall Node JS On Windows Mac Linux

Why You Might Want A Fresh Start

You installed Node months ago, wrote a quick app, and now your project folder feels like a messy desk.
Maybe you hit a weird npm err that keeps shouting at the screen.
Or you switched branches and discovered three node versions fighting for space.
Whatever the reason, a clean slate helps with system stability, so let’s get you there.
If you’re looking for a deeper dive into managing development environments, check out the comprehensive guides on TechVentures.
For an additional hands-on walkthrough tailored to each operating system, explore TechVentures’ dedicated guide on completely uninstalling Node.js across Windows, macOS, and Linux.

Quick Check: Do You Really Have Node?

  1. Open Terminal on macOS or Linux, or fire up Command Prompt on Windows.
  2. Type node -v.
  3. If you see a version number, you’ve got node installed.
  4. If the shell says “not found,” you’re already free.

Picking The Right Path: Beginner Or Pro?

Beginners like a straightforward process with a single script.
Pros might prefer a manual uninstallation so they can peek at every folder.
Both roads end in the same place: completely removed Node bits.
For a concise cross-platform walkthrough, the tutorial on uninstalling Node.js provides another solid reference.

Backup First Or Skip? Your Choice

Copy your code, export your environment variables, and note any global npm packages you love.
You can always reinstall node later, so don’t sweat it.

Windows 10: The Five-Minute Removal Walkthrough

Windows removal sounds scary, but it’s really a straightforward process.

  1. Hit the Windows key, type “Add or Remove Programs,” open it.
  2. Scroll to “Node.js.” Click Uninstall Command in the dialog.
  3. The official installer pops up; click through.
  4. When it claims to be successfully uninstalled, don’t trust yet.

Scrub Program Files

Open File Explorer.
Browse to C:Program Filesnodejs.
If you still see node files, delete them.
Now hop to %AppData%npm and wipe any npm directories.

Tidy The Windows Registry

Search “Registry Editor,” open it, and back up first.
Navigate to HKEY_CURRENT_USERSoftwareNode.js.
Wipe the key.
Do the same at HKEY_LOCAL_MACHINESOFTWARENode.js.
This nukes leftover windows registry pointers.

Remove Leftovers From The Windows Registry

Some paths hide under
HKEY_CLASSES_ROOTInstallerProducts.
If you spot anything called Node, right-click and delete node entries.
Close the editor, then open Task Manager to confirm no rogue node.exe keeps running.

Mac OS X: Say Goodbye With Homebrew

Most Mac folks installed with Brew.
Run the following command:

brew uninstall node

You might see a note about brew install node in the past.
If Brew says “unlinked,” run:

run brew uninstall node --force

Celebrate when it claims to be successfully uninstalled.

Manual Mac Clean-Up For The Curious

Even Brew leaves residual files.
If you’d like an extra checklist of folders to remove, you can consult this detailed StackOverflow answer that maps out every location on macOS.
Open Terminal again and fire these lines:

sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /usr/local/include/node
sudo rm -rf /usr/local/bin/node
sudo rm -rf /usr/local/bin/npm

You just used sudo rm rf usr to blast core bits.
Check ~/Library/Preferences/ for associated configuration files like com.nodejs.plist.
Trash them.

Deep Dive Into usr/local

Sometimes usr local lib still holds node gyp build folders.
Use the below command:

sudo rm -rf /usr/local/lib/node*

Now peek at usr local share/man for man pages.
If you see node.1, wipe it.
That step ensures complete uninstallation.

Linux Ubuntu: Purge And Polish

Ubuntu loves APT, so tell it:

sudo apt-get purge nodejs
sudo apt-get autoremove

You called apt get purge twice for good measure.
Verify with which node.
If a path shows, you’ve got leftover files.

Smash Them Manually

Run the following command:

sudo rm -rf usr local bin
sudo rm -rf usr local lib
sudo rm -rf usr local share

You see how rf usr local bin and buddies clear usr local bin node and usr local bin npm.
Check usr local lib node_modules too; wipe it if present.

CentOS And Fedora: The Yum Way

For RPM systems:

sudo yum remove nodejs npm

After Yum finishes, clean usr local lib node_modules, usr local share/doc/node, and any node gyp caches.
Again, smash with sudo rm rf usr.

Dealing With Multiple Versions

If you have multiple versions installed, life’s messy.
Maybe you played with brew install node on one project and the official installer on another.
Sweeping all paths above makes sure each specific version disappears.

Scrubbing Global Packages

Global tools like nodemon live in usr local lib node_modules.
Deleting that folder removes every global packages you once loved.
Check the list of installed global packages with npm ls -g --depth=0 before the purge.

Cleaning The npm Cache

The npm cache lives in your home folder.
Run the following command:

npm cache clean --force

Look for ~/.npm/_cacache.
If it lingers, hit it with sudo rm rf yet again.
Empty cache means fewer residual files.

Wiping Out Node Modules Folders

Inside each project you’ll find node_modules.
Use rm -rf node_modules to wipe them.
This folder can eat gigabytes, so you regain disk space fast.

Fixing Permissions And Weird Errors

Sometimes permission errors stop removal.
Prefix any stubborn move with sudo, or on Windows run the shell as Admin.
That little step saves you from half the headaches.

Testing A Clean Slate

Type node -v again.
The shell should cry “command not found.”
Run npm -v, and it should echo the same sadness.
Congrats—node.js and npm are completely removed from your box.

Reinstalling Node The Smart Way

Miss your runtime already?
When you’re ready, use the official installer or Brew to get everything installed correctly.
If you need a specific version, keep reading.

Automating Future Switches With NVM

Enter node version manager—better known as NVM.
It handles version management without drama.
Install it with the following command:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash

Then run nvm install 20 for the latest.
Need to hop backward? Type nvm use 18.
No more juggling multiple versions.
You’ll thank yourself the next time you’re switching versions for a legacy project.

Safety Tips For Teams And Servers

On a shared windows machine, warn teammates before you nuke paths.
Keep scripts handy so every dev can replicate the complete uninstallation steps.
Remember to reset any environment variables that pointed to custom paths.

Final Thoughts: Enjoy The Silence

You just finished uninstalling node js chaos.
With node.js and npm gone, disk space grows and the build pipeline turns quiet.
Later, when you brew install node again, everything will be crisp and correctly installed.
Now go code in peace.