Skip to main content
Version: 9.x

pnpm unlink

取消链接系统范围的包(与 pnpm link 相反)。

¥Unlinks a system-wide package (inverse of pnpm link).

如果不带参数调用,则当前项目内的所有链接依赖都将取消链接。

¥If called without arguments, all linked dependencies will be unlinked inside the current project.

这与 yarn unlink 类似,只不过 pnpm 在删除外部链接后重新安装依赖。

¥This is similar to yarn unlink, except pnpm re-installs the dependency after removing the external link.

信息

如果你想删除使用 pnpm link --global <package> 建立的链接,你应该使用 pnpm uninstall --global <package>pnpm unlink 仅删除当前目录中的链接。

¥If you want to remove a link made with pnpm link --global <package>, you should use pnpm uninstall --global <package>. pnpm unlink only removes the links in your current directory.

选项

¥Options

--recursive, -r

workspace 中执行时,取消子目录或每个工作区包中找到的每个包的链接。

¥Unlink in every package found in subdirectories or in every workspace package, when executed inside a workspace.

--filter <package_selector>

了解有关过滤的更多信息。

¥Read more about filtering.