如何从Windows中删除Node.js

1.从卸载程序卸载程序和功能。

2.重新启动(或者您可能会从任务管理器中杀死所有与节点相关的进程)。

3.寻找这些文件夹并删除它们(及其内容)(如果还有)。根据您安装的版本,UAC设置和CPU架构,这些可能或可能不存在:

C:\Program Files (x86)\Nodejs
C:\Program Files\Nodejs
C:\Users{User}\AppData\Roaming\npm(或%appdata%\npm)
C:\Users{User}\AppData\Roaming\npm-cache(或%appdata%\npm-cache)

4.检查您的%PATH%环境变量以确保没有引用Nodejs或npm存在。

5.如果仍然没有卸载,请where node在命令提示符下键入,您将看到它所在的位置 - 删除(也可能是父目录)。

6.重新启动,很好的措施。

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

How to remove Node.js from Windows:
Take a deep breath.

Run npm cache clean --force

Uninstall from Programs & Features with the uninstaller.

扫描二维码关注公众号,回复: 6173027 查看本文章

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 or npm 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.

猜你喜欢

转载自blog.csdn.net/qq_34322008/article/details/89955156