Table of Contents
In this post, we'll learn how to uninstall Node and NPM on Windows.
The first thing you should do is clear your NPM cache. This is a good idea to do before you uninstall Node as it will remove any information that Node has cached about your dependencies.
To clear your NPM cache, run the following command:
BASHnpm cache clean --force
From there, go to your Control Panel. You can do this by searching for Control Panel in the search bar.
Once there, select the Programs and Features option.
Then, find and select Node.js and click the Uninstall button.
This will begin the uninstallation process.
After this has finished, restart you computer so the changes can take effect.
Once you've restarted your computer, you should be able to run the following command to confirm that Node and NPM have been uninstalled:
BASHnode -v
npm -v
If your system cannot recognize or find these commands, then it means you've successfully uninstalled Node and NPM on your Windows system.
Manual Removal
If after running the above commands, you still see the Node and NPM commands return a valid version, then might need to manually remove them.
To do so, remove everything in the following directories:
BASHC:\Program Files (x86)\Nodejs
C:\Program Files\Nodejs
C:\Users\{Username}\AppData\Roaming\npm
C:\Users\{Username}\AppData\Roaming\npm-cache
Or if you prefer to use the %appdata% environment variable, you can use these directories:
BASHC:\Program Files (x86)\Nodejs
C:\Program Files\Nodejs
%appdata%\npm
%appdata%\npm-cache
Once again, restart your computer so the changes can take effect.
Conclusion
We've seen how to uninstall Node and NPM on Windows.
Hopefully, you able to complete these steps successfully and uninstall Node and NPM from your Windows system!
How to Install Node on Windows, macOS and Linux
Getting Started with Solid
Getting Started with Svelte
Getting Started with Electron
Git Tutorial: Learn how to use Version Control
Getting Started with Deno
How to deploy a Node app using Docker
How to Scrape the Web using Node.js and Puppeteer
Build a Real-Time Chat App with Node, Express, and Socket.io
Getting Started with Moment.js
Using Push.js to Display Web Browser Notifications
Setting Up Stylus CSS Preprocessor
