いつも適当に環境構築をして、ゴミだらけにしてしまい原状復帰に困ってしまうのでメモ。
https://stackoverflow.com/questions/20711240/how-to-completely-remove-node-js-from-windows
- Take a deep breath.
- Run
npm cache clean --force
- Uninstall from Programs & Features with the uninstaller.
- Reboot (or you probably can get away with killing all node-related processes from Task Manager).
- 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-*
- Check your %PATH% environment variable to ensure no references to
Nodejs
ornpm
exist. - 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. - Reboot, for good measure.