Skip to main content
⚑ OpenDevDocs
pnpm
toolspnpmReferenceBeginner

pnpm install (Clean & CI Install)

Deterministic and frozen-lockfile installation command for CI/CD and production environments with pnpm.

Verified: 2026-09-30
Tested on:pnpm 12.x, node 22.x
Platforms:
all
#pnpm#node#package-manager#ci

Command

pnpm install --frozen-lockfile


Short Description

pnpm install --frozen-lockfile installs packages strictly according to pnpm-lock.yaml. If pnpm-lock.yaml is out of date or needs updating, the command aborts and fails with an exit code, guaranteeing deterministic builds in CI/CD pipelines.


Common Flags

FlagPurpose
--frozen-lockfileStrict CI flag; errors if lockfile is modified or out of sync.
--prod, -PInstall only dependencies, ignoring devDependencies.
--prefer-offlineSkip network checks for packages already in local store.
--shamefully-hoistHoists all dependencies to flat node_modules (useful for legacy packages).

On this page