How to uninstall Node.js LTS on Windows
Node.js itself keeps almost no data of its own; what usually matters after removing it is npm's global packages and cache, and your own project folders with their node_modules, none of which the uninstaller touches. This guide covers the Node.js LTS line installed machine-wide from the OpenJS.NodeJS.LTS winget package.
Close anything using Node first
Close any terminal, editor or build tool with a running node, npm or npx process, since a locked file can stop the uninstaller partway through. Check Task Manager (Ctrl+Shift+Esc) for node.exe before you uninstall.
Remove the app with its own uninstaller
Go to Settings › Apps › Installed apps, find Node.js, and choose Uninstall, or run:
winget uninstall --id OpenJS.NodeJS.LTS
This uses an MSI installer and asks for administrator access, since Node.js installs machine-wide.
Where the data lives
| Location | What it holds | What to do |
|---|---|---|
%USERPROFILE%\.node_repl_history |
Commands you typed in the interactive node shell |
Personal history, not touched by the uninstaller; delete it yourself if you want it gone |
%APPDATA%\npm |
Global packages installed with npm install -g |
Reinstall these after a clean install, or back up the folder if you want to keep them as-is |
%LOCALAPPDATA%\npm-cache |
npm's download cache | Safe to remove; npm rebuilds it as needed |
The last two locations are npm's own documented default paths, not something this test measured directly; the uninstaller does not touch either of them.
Check the result
Run these read-only commands after the uninstall finishes, ideally from a new terminal window:
node --version
winget list --id OpenJS.NodeJS.LTS
Test-Path "$env:ProgramFiles\nodejs"
Test-Path "$env:APPDATA\npm"
node --versionfailing with "not recognized" means Node.js is gone from your PATH; printing a version means either the uninstall did not finish or another Node.js install is still on your machine.- A completed
winget listquery with no match means the package record is gone; a matching row means the uninstall did not finish. Test-Path "$env:ProgramFiles\nodejs"returningFalsemeans the program folder is gone;Truemeans files remain there.Test-Path "$env:APPDATA\npm"returningTruemeans your globally installed packages are still there, which is expected unless you removed them yourself.
If you installed it with winget
winget uninstall runs the same MSI uninstaller Settings › Apps uses and removes the same program files; it does not touch %APPDATA%\npm, %LOCALAPPDATA%\npm-cache or your project folders.
What Mole lists
For Node.js LTS installed machine-wide from winget:
- The Start Menu folder is selected by default.
HKCU\SOFTWARE\Node.jsis listed but not selected.- In this test, the MSI uninstaller had already removed both of these on its own by the time Mole's review reached them.
%USERPROFILE%\.node_repl_historyis not currently listed, since it holds a personal command history rather than app or cache data.
Your project folders and their node_modules, and npm's own global packages and cache, are not part of this list.
What this test covered
Tested with Node.js LTS 24.19.0 installed through winget, machine scope, MSI, elevated. No global npm packages were installed during the test, so the npm folders above were not exercised.
