pnpm unlink

Aliases: dislink

Removes links created by pnpm link <dir> and reinstalls the packages as declared.

pnpm unlink [<pkg>...]

pnpm link records each link as a link: entry in the overrides of pnpm-workspace.yaml. pnpm unlink removes those overrides, all of them or only the named ones, and then reinstalls. If no overrides are configured, it prints Nothing to unlink and stops.

이는 yarn unlink와 비슷하지만, pnpm은 외부 링크를 제거한 후 종속성을 다시 설치한다는 점이 다릅니다.

Since v12.7.0, if pnpm link <dir> added a link: dependency to package.json, pnpm unlink removes that entry too, along with the package in node_modules and its lockfile entry. A link: dependency that points to another directory is kept.

옵션#

--recursive, -r#

하위 디렉터리에서 찾은 모든 패키지에서 링크를 해제하거나, 워크스페이스 내에서 실행하면 모든 워크스페이스 패키지에서 링크를 해제합니다.

--ignore-pnpmfile#

Don't load the hooks in .pnpmfile.cjs, including the pnpmfiles of config dependencies.

--filter <package_selector>#

필터링에 대해 자세히 알아보세요.