卸载 pnpm 您所在的位置:网站首页 mac怎么卸载node 卸载 pnpm

卸载 pnpm

2024-07-18 04:48| 来源: 网络整理| 查看: 265

卸载 pnpm 删除全局安装的软件包​

¥Removing the globally installed packages

在删除 pnpm CLI 之前,删除 pnpm 安装的所有全局包可能是有意义的。

¥Before removing the pnpm CLI, it might make sense to remove all global packages that were installed by pnpm.

要列出所有全局包,请运行 pnpm ls -g。有两种方法可以删除全局包:

¥To list all the global packages, run pnpm ls -g. There are two ways to remove the global packages:

运行 pnpm rm -g ... 并列出每个全局包。

¥Run pnpm rm -g ... with each global package listed.

运行 pnpm root -g 查找全局目录的位置并手动将其删除。

¥Run pnpm root -g to find the location of the global directory and remove it manually.

删除 pnpm CLI​

¥Removing the pnpm CLI

如果你使用独立脚本安装 pnpm,那么你应该能够通过删除 pnpm 主目录来卸载 pnpm CLI:

¥If you used the standalone script to install pnpm, then you should be able to uninstall the pnpm CLI by removing the pnpm home directory:

rm -rf $PNPM_HOME

你可能还想清除 shell 配置文件中的 PNPM_HOME 环境变量($HOME/.bashrc、$HOME/.zshrc 或 $HOME/.config/fish/config.fish)。

¥You might also want to clean the PNPM_HOME env variable in your shell configuration file ($HOME/.bashrc, $HOME/.zshrc or $HOME/.config/fish/config.fish).

如果你使用 npm 安装 pnpm,那么你应该使用 npm 卸载 pnpm:

¥If you used npm to install pnpm, then you should use npm to uninstall pnpm:

npm rm -g pnpm 删除全局内容可寻址存储​

¥Removing the global content-addressable store

rm -rf $(pnpm store path)

如果你在非主磁盘中使用 pnpm,则必须在使用 pnpm 的每个磁盘中运行上述命令。pnpm 为每个磁盘创建一个存储。

¥If you used pnpm in non-primary disks, then you must run the above command in every disk, where pnpm was used. pnpm creates one store per disk.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

      专题文章
        CopyRight 2018-2019 实验室设备网 版权所有