How to remove Node.js from Windows:

  1. Take a deep breath.

  2. Run npm cache clean --force

  3. Uninstall from Programs & Features with the uninstaller.

  4. Reboot (or you probably can get away with killing all node-related processes from Task Manager).

  5. Look for these folders and remove them (and their contents) if any still exist. Depending on the version you installed, UAC settings, and CPU architecture, these may or may not exist:

  • C:\Program Files (x86)\Nodejs
  • C:\Program Files\Nodejs
  • C:\Users\{User}\AppData\Roaming\npm (or %appdata%\npm)
  • C:\Users\{User}\AppData\Roaming\npm-cache (or %appdata%\npm-cache)
  • C:\Users\{User}\.npmrc (and possibly check for that without the . prefix too)
  • C:\Users\{User}\AppData\Local\Temp\npm-*
  1. Check your %PATH% environment variable to ensure no references to Nodejs or npm exist.

  2. If it's still not uninstalled, type where node at the command prompt and you'll see where it resides -- delete that (and probably the parent directory) too.

  3. Reboot, for good measure.

Answer from brandonscript on Stack Overflow
Top answer
1 of 12
1243

How to remove Node.js from Windows:

  1. Take a deep breath.

  2. Run npm cache clean --force

  3. Uninstall from Programs & Features with the uninstaller.

  4. Reboot (or you probably can get away with killing all node-related processes from Task Manager).

  5. Look for these folders and remove them (and their contents) if any still exist. Depending on the version you installed, UAC settings, and CPU architecture, these may or may not exist:

  • C:\Program Files (x86)\Nodejs
  • C:\Program Files\Nodejs
  • C:\Users\{User}\AppData\Roaming\npm (or %appdata%\npm)
  • C:\Users\{User}\AppData\Roaming\npm-cache (or %appdata%\npm-cache)
  • C:\Users\{User}\.npmrc (and possibly check for that without the . prefix too)
  • C:\Users\{User}\AppData\Local\Temp\npm-*
  1. Check your %PATH% environment variable to ensure no references to Nodejs or npm exist.

  2. If it's still not uninstalled, type where node at the command prompt and you'll see where it resides -- delete that (and probably the parent directory) too.

  3. Reboot, for good measure.

2 of 12
62

Scenario: Removing NodeJS when Windows has no Program Entry for your Node installation

I ran into a problem where my version of NodeJS (0.10.26) could NOT be uninstalled nor removed, because Programs & Features in Windows 7 (aka Add/Remove Programs) had no record of my having installed NodeJS... so there was no option to remove it short of manually deleting registry keys and files.

Command to verify your NodeJS version: node --version

I attempted to install the newest recommended version of NodeJS, but it failed at the end of the installation process and rolled back. Multiple versions of NodeJS also failed, and the installer likewise rolled them back as well. I could not upgrade NodeJS from the command line as I did not have SUDO installed.

SOLUTION: After spending several hours troubleshooting the problem, including upgrading NPM, I decided to reinstall the EXACT version of NodeJS on my system, over the top of the existing installation.

That solution worked, and it reinstalled NodeJS without any errors. Better yet, it also added an official entry in Add/Remove Programs dialogue.

Now that Windows was aware of the forgotten NodeJS installation, I was able to uninstall my existing version of NodeJS completely. I then successfully installed the newest recommended release of NodeJS for the Windows platform (version 4.4.5 as of this writing) without a roll-back initiating.

It took me a while to reach sucess, so I am posting this in case it helps anyone else with a similar issue.

People also ask

How to uninstall Node.js in Windows Command Prompt?
While there isn’t a direct uninstall Node.js on Windows command, you can use Command Prompt to remove Node.js by first running npm uninstall -g for global modules, then manually deleting the Node.js installation folder and npm directories.
🌐
visionx.io
visionx.io › home › blog › how to uninstall node.js on different operating systems?
How to Uninstall Node.js on Different Operating Systems? - VisionX
How to uninstall Node, npm, and nvm?
You can completely remove Node.js, npm, and nvm by first using commands like nvm uninstall or nvm remove. Then, delete the remaining Node.js directories and npm cache to finish the Node.js uninstall process.
🌐
visionx.io
visionx.io › home › blog › how to uninstall node.js on different operating systems?
How to Uninstall Node.js on Different Operating Systems? - VisionX
How to uninstall npm in Windows?
The npm can be removed during the process of uninstalling Node.js on Windows. After using Control Panel or Command Prompt to uninstall Node, delete the npm and npm-cache folders from AppDataRoaming.
🌐
visionx.io
visionx.io › home › blog › how to uninstall node.js on different operating systems?
How to Uninstall Node.js on Different Operating Systems? - VisionX
Top answer
1 of 5
137

As seen from the output of:

sudo apt-get purge nodejs

it is only removing node related packages i.e. relevant packages, nothing more.

On the other hand, when you do:

sudo apt-get purge --auto-remove nodejs

it is essentially doing:

sudo apt-get purge nodejs
sudo apt-get autoremove

and the removal of the gyp, linux-headers-4.4.0-18-generic etc packages are actually triggered by autoremove as they were installed as dependencies and no longer needed by any installed package, presumably because the main package has been removed.

So it is perfectly fine in this context to run:

sudo apt-get purge --auto-remove nodejs

If you are too paranoid, you can do it in two steps: first purge nodejs:

sudo apt-get purge nodejs

and then remove the orphan dependencies (till now, if any):

sudo apt-get autoremove
2 of 5
26

To remove node js, npm and node_modules from Ubuntu, you need to remove containers also which are at different locations in Ubuntu. These could be as:

/usr/local/bin/npm, /usr/local/share/man/man1/node, /usr/local/lib/dtrace/node.d, ~/.npm ~/.node-gyp, /opt/local/bin/node, opt/local/include/node, /opt/local/lib/node_modules

I have posted the procedure to remove NodeJS on my blog: AMCOS IT Support For Windows and Linux: To completely uninstall node js from Ubuntu.

  1. First of all you need to run the following command from command terminal as sudo.

    sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node opt/local/include/node /opt/local/lib/node_modules
    
  2. Remove node or node_modules directories from /usr/local/lib with the help of following command.

    sudo rm -rf /usr/local/lib/node*
    
  3. Remove node or node_modules directories from /usr/local/include with the help of following command.

    sudo rm -rf /usr/local/include/node*
    
  4. Remove any node file or dir from /usr/local/bin with the help of following command.

    sudo rm -rf /usr/local/bin/node*
    
  5. Go to home directory and remove any node or node_modules directory, if exists.

🌐
Softsuave
softsuave.com › home › how to uninstall node js: best practices for a clean uninstall
How to Uninstall Node js: Best Practices for a Clean Uninstall
May 13, 2025 - Open the terminal or command prompt. Type node -v and press Enter to see the Node.js version. Type npm -v and press Enter to see the npm version. Proceed with Uninstallation: Once you have backed up your files and noted the versions, you can ...
🌐
VisionX
visionx.io › home › blog › how to uninstall node.js on different operating systems?
How to Uninstall Node.js on Different Operating Systems? - VisionX
September 4, 2025 - ... Update your system’s $PATH ... After deleting these directories, you can verify that Node.js is uninstalled by typing node -v and npm -v in the Terminal....
🌐
GeeksforGeeks
geeksforgeeks.org › node.js › uninstall-node-js-using-linux-command-line
Uninstall Node.JS Using Linux Command Line - GeeksforGeeks
October 17, 2024 - nvm (Node Version Manager) for managing multiple versions of Node.js. Manual installation from binary files. ... This will uninstall nodejs from the system.
🌐
Codedamn
codedamn.com › news › node.js
How to uninstall Node.js? Remove Node.js from your system completely
June 2, 2023 - Go to the windows control panel. Select Uninstall a program. Right-Click on Nodejs and uninstall. ... If you see an output like this: then Node is successfully uninstalled from your computer.
Find elsewhere
🌐
LinuxVox
linuxvox.com › blog › uninstall-node-js-using-linux-command-line
How to Uninstall Node.js Using Linux Command Line: Step-by-Step Guide — linuxvox.com
Fix: Prepend commands with sudo (e.g., sudo apt purge nodejs). Cause: NVM initialization lines were not removed from your shell config. Fix: Edit ~/.bashrc (or your shell’s config file) and delete NVM-related lines, then run source ~/.bashrc.
🌐
CodeForGeek
codeforgeek.com › home › different ways to uninstall node.js from windows: an easy guide
Different Ways to Uninstall Node.js from Windows: An Easy Guide | CodeForGeek
May 27, 2024 - In this tutorial, we have seen various methods to completely uninstall Node js from a Windows machine. Node.js can be uninstalled using the “App and Features Setting”, using the “Command Prompt”, using “Registry Editor”, and the “Control Panel”. You can choose any method that suits your preferences.
🌐
Lavalite
lavalite.org › blog › uninstalling-nodejs-from-linux-using-cmd
Uninstalling Node.js from Linux using cmd - Lavalite
When you want to uninstall a program usually we uninstall from the UI. Lets see how to uninstall · Node.js from Linux using command prompt.
🌐
GeeksforGeeks
geeksforgeeks.org › node.js › how-to-completely-remove-node-js-from-windows
How to Completely Remove Node.js from Windows ? - GeeksforGeeks
June 7, 2024 - So, we need to clean the cache first. The cache can be cleaned by using the following command. ... Step 3: Now open the control panel in the computer. Search for Program and features. Under the program and features click on Uninstall a program. Now search for Node.js and uninstall it.
Top answer
1 of 16
2031

Apparently, there was a /Users/myusername/local folder that contained a include with node and lib with node and node_modules. How and why this was created instead of in my /usr/local folder, I do not know.

Deleting these local references fixed the phantom v0.6.1-pre. If anyone has an explanation, I'll choose that as the correct answer.

EDIT:

You may need to do the additional instructions as well:

sudo rm -rf \
/usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}

which is the equivalent of (same as above)...

sudo rm -rf \
  /usr/local/bin/npm \
  /usr/local/share/man/man1/node* \
  /usr/local/lib/dtrace/node.d \
  ~/.npm \
  ~/.node-gyp

or (same as above) broken down...

To completely uninstall node + npm is to do the following:

  1. go to /usr/local/lib and delete any node and node_modules
  2. go to /usr/local/include and delete any node and node_modules directory
  3. if you installed with brew install node, then run brew uninstall node in your terminal
  4. check your Home directory for any local or lib or include folders, and delete any node or node_modules from there
  5. go to /usr/local/bin and delete any node executable

You may also need to do:

sudo rm -rf /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules
sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node.1 /usr/local/lib/dtrace/node.d

Additionally, NVM modifies the PATH variable in $HOME/.bashrc, which must be reverted manually.

Then download nvm and follow the instructions to install node. The latest versions of node come with npm, I believe, but you can also reinstall that as well.

2 of 16
722

For brew users, OSX:

To remove:

brew uninstall node; 
# or `brew uninstall --force node` which removes all versions
brew cleanup;
rm -f /usr/local/bin/npm /usr/local/lib/dtrace/node.d;
rm -rf ~/.npm;

To install:

brew install node;
which node # => /usr/local/bin/node
export NODE_PATH='/usr/local/lib/node_modules' # <--- add this ~/.bashrc

You can run brew info node for more details regarding your node installs.


consider using NVM instead of brew

NVM (node version manager) is a portable solution for managing multiple versions of node

https://github.com/nvm-sh/nvm

> nvm uninstall v4.1.0
> nvm install v8.1.2
> nvm use v8.1.2
> nvm list
         v4.2.0
         v5.8.0
        v6.11.0
->       v8.1.2
         system

you can use this with AVN to automatically switch versions as you hop between different projects with different node dependencies.

🌐
Scaler
scaler.com › topics › uninstall-node-js
How to uninstall Node.js? - Scaler Topics
September 22, 2023 - Ubuntu (Linux) : On Ubuntu, a Linux distribution, Node.js can be uninstalled using the package manager, which offers a straightforward process. By using commands like sudo apt remove nodejs and sudo apt remove npm, users can easily remove Node.js ...
🌐
Ruslan
ruslan.rocks › home › blog › how to uninstall node.js
How to Uninstall Node.js
June 8, 2023 - For example, npm uninstall -g <package-name>. If you use a version manager such as nvm (Node Version Manager) to manage multiple versions of Node.js on your system, uninstalling Node.js will not automatically remove it from the version manager.
🌐
Reactgo
reactgo.com › home › how to completely uninstall node.js and npm from windows
How to completely uninstall Node.js and npm from Windows | Reactgo
August 3, 2023 - Learn, how to completely uninstall node.js and npm from a Windows operating system. Uninstalling the Node.js Clear the npm cache by running…
🌐
JanBask Training
janbasktraining.com › community › web-development › how-can-i-uninstall-or-remove-node-js1
How can I uninstall or remove node js? | JanBask Training Community
January 4, 2024 - Manual uninstallation: If you don’t install node.js from homebrew then you can delete it manually by using the following command:
🌐
Rip Tutorial
riptutorial.com › uninstall node.js on windows
Node.js Tutorial => Uninstall Node.js on Windows
Open Add or Remove Programs from the start menu. Search for Node.js. ... Click Node.js. Click Uninstall.
🌐
MacPaw
macpaw.com › how to › optimization › apps
How to uninstall Node on your Mac
February 14, 2025 - If you installed Node using Homebrew, go to Applications > Utilities and open Terminal, then type the following command: ... That will uninstall Node and all of its components.