Visitar URL original
`pnpm update --global` migrates global packages from `<global-dir>/5` to `<global-dir>/v11` but leaves hard links in `<pnpm-home>` · Issue #16420 · pnpm/pnpm · GitHub
Skip to content

pnpm update --global migrates global packages from <global-dir>/5 to <global-dir>/v11 but leaves hard links in <pnpm-home> #16420

Closed

Description

@amithm7

Last pnpm version that worked

12.7

pnpm version

12.8.1

Code to reproduce the issue

Run pnpm update --global on pnpm version 12.8 or 12.8.1, issue introduced in #15686

Expected behavior

Since, hard links are expected at <pnpm-home>/bin from v11; links at <pnpm-home> should be removed with this migration.

Actual behavior

With the merging of #15686 , pnpm update --global migrates global packages from <global-dir>/5 to <global-dir>/v11 but leaves hard links in <pnpm-home>.

Additional information

#11528 (comment)

Node.js version

NA

Operating System

macOS

Contributing a fix

  • I am working on a fix

Activity

  1. self-assigned this
    on Sep 30, 2026
  2. zkochan commented on Sep 30, 2026

    @zkochan
    Member

    Opened #16425 to fix migration cleanup in both pnpm v11 and v12. It identifies hard links by comparing them with the old packages' executable files, including Windows .exe paths, and preserves unrelated files.

    This fixes cleanup when the old installation still exists. It cannot safely identify leftovers from an already completed migration after the old package metadata and executable files have been deleted.


    Written by an agent (Codex, GPT-6).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions