Different Ways to Uninstall Node.js from Windows: An Easy Guide

Node.js is a runtime environment built on the Chrome V8 engine that compiles JavaScript and converts it to native machine code. It is perfect for developing real-time web apps, chat applications, APIs, microservices, high-traffic websites, etc.

I am personally a big fan of Node.js, but if you are someone who tried it and has not found it suitable for your use, then this tutorial is for you.

In this tutorial, I will explain various methods to completely remove Node.js from your Windows machine. The methods will be very simple and you can choose any one which is easy for you. Let’s get started.

If you are just uninstalling Node.js because you want to install the latest version, you can upgrade it directly, see our tutorial for the full guide – How to Update Node Version on Windows, Linux, and macOS

How to Check if Node.js is Installed?

Before getting deeper into the methods for uninstalling Node.js from your system, let’s see how to check if it is actually installed or not.

Manual Check:

To manually check if you have Node.js installed on a Windows machine:

  • Open File Explorer
  • Go to This PC from the left sidebar
  • Open C:/ drive and simply move to this file path: C:\Program Files\nodejs.
  • Or, simply navigate to the file path you had originally installed Nodejs and look there for the “nodejs” directory.

Other folders to check if Node.js, NPM-related files, or global node_modules are installed on your system can be:

  • 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 (make sure you look for the files or directories without the . prefix too)
  • C:\Users\{User}\AppData\Local\Temp\npm-*

Using Command Prompt:

Another way to check if Node.js is installed on a Windows machine is to check it via the command line using the version of node:

  • Go to Start and search for Command Prompt, then Right-click on the result and select Run as administrator
  • Or, press the Win key + R to open Run. Type cmd and hit Ctrl+Shift+enter to run Command Prompt as administrator.
  • Now, execute the below command:
node --version

or

node -v

This command returns the Node.js version if it is installed on your PC.

Uninstalling Node.js Using Apps & Features Settings

The easiest way to uninstall Node.js from Windows is via the Apps & Features settings:

  • Click the start button and go to settings by clicking the gear icon.
  • Click Apps.
  • Under the Apps & features subheading, look for a search box and search for Nodejs.
  • Click the Nodejs application.
  • Lastly, click Uninstall.
  • Check the file path where you installed Node. The “nodejs” directory containing the Node modules directory should now be gone.

No matter which method you use, you may be asked to restart your Windows machine. If not, it is still recommended that you do so. Sometimes, changes may take time to be reflected.

Uninstall Node.js Using Command Prompt

The fastest way to uninstall Node is by using the command line:

  • Go to Start and search for Command Prompt, then Right-click on the result and select Run as administrator
  • Or, press the Win key + R to open Run. Type cmd and hit Ctrl+Shift+enter to run Command Prompt as administrator.
  • Now, run the following command which uses Node Package Manager to uninstall Nodejs:
npm uninstall -g node
  • After executing, check for the “nodejs” directory in your system to see whether it has been deleted or not.

Uninstall Node.js Using Registry Editor

We can also completely uninstall Node.js using Registry Editor:

  • Open Start, search for Registry Editor and click the result.
  • Or, press the Win key + R to open Run. Type regedit and hit enter.
  • You will be prompted by Windows saying “Do you want to allow this app to make changes?”. Click Yes.
  • Now, in the path field on top, simply paste this path:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Node.js
  • Next, on the sidebar on the left, you should now be able to see the Nodejs directory.
  • Right-click on it and click delete.
  • Now, you will need to again check in the path where you originally installed Node for the “nodejs” directory if it exists or not.

Uninstall Node.js in Windows Using Control Panel

Another quick and easy way to remove Node.js from Windows is to use the traditional Control Panel:

  • Open Start and search for Control Panel. 
  • Or, press the Win key+R to open Run. Type control and hit enter.
  • Click Programs
  • Under the Programs and Features option, click Uninstall a Program
  • Look for Nodejs and right-click on it.
  • Now, click Uninstall.
  • You will be prompted by the Control Panel by saying “Are you sure you want to uninstall Nodejs…”. Click Yes and Node.js will be completely removed.

Conclusion

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. The easiest method is to use  “App and Features Setting” or “Control Panel”. The faster method is to use the “Command Prompt”. 

If you are uninstalling it just because you find another programming language better, you may be wrong, check out our below comparisons of Node.js with other popular technologies to doubt your decision.

Reference

https://stackoverflow.com/questions/20711240/how-to-completely-remove-node-js-from-windows

Aneesha S
Aneesha S
Articles: 171