如何卸载通过npx terminalgpt安装的terminalgpt包?
卸载 terminalgpt 的解决方法
- 先确认包是否全局安装:
执行命令npm list -g terminalgpt,若返回具体路径则说明已全局安装;若提示不存在,说明npx terminalgpt只是临时运行,无全局残留,无需卸载。 - 缓存问题导致卸载失败的处理:
- 强制清除npm缓存:
npm cache clean --force - 重新执行全局卸载:
npm uninstall -g terminalgpt
- 强制清除npm缓存:
- 手动删除残留文件:
- 获取全局npm包路径:执行
npm prefix -g,Mac/Linux 通常为/usr/local,Windows 一般是C:\Users\<你的用户名>\AppData\Roaming\npm - 进入该路径下的
lib/node_modules文件夹,删除terminalgpt目录 - 进入路径下的
bin目录(Mac/Linux)或直接在npm根目录(Windows),删除terminalgpt相关可执行文件(如terminalgpt、terminalgpt.cmd)
- 获取全局npm包路径:执行
- 其他包管理器的卸载方式:
若使用yarn或pnpm安装,对应执行yarn global remove terminalgpt或pnpm remove -g terminalgpt
内容的提问来源于stack exchange,提问作者mxcdh
相关产品推荐
相关产品推荐

