如何从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.

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值