Skip to content

pnpm v11: Removing a global package removes any other package installed with the same original command #11587

@jaens

Description

@jaens

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

No response

Which area(s) of pnpm are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

pnpm add -g lodash debug
pnpm list -g
pnpm remove -g debug
pnpm list -g # lodash and debug are *both* gone

Describe the Bug

If you install a bunch of packages with pnpm add -g <pkgs> and then remove one of them with pnpm remove -g <pkg>, all of the packages will be removed.

Expected Behavior

Only one package is removed.

Not sure if intentional - in that case this behaviour is highly unintuitive and a radical change from v10 where all packages installed were independent.

I imagine there are tons of scripts that use pnpm add -g <pkgs> expecting the resulting packages to be independent.

Which Node.js version are you using?

22.22.1

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions