pnpm remove

Псевдоніми: rm, uninstall, un

Видаляє пакунки з node_modules та з `package.json проєкту.

Since v11.28.0, pnpm remove runs the project's own preuninstall, uninstall, and postuninstall scripts. See Uninstall scripts.

Параметри#

--recursive, -r#

У разі використання всередині робочої області видаляє залежність (або залежності) з кожного пакунка робочої області.

При використанні не всередині робочої області, видаляє залежність (або залежності) з кожного пакунка знайденого у вкладених теках.

Since v11.28.0, the command fails before any package.json is modified if a requested dependency is absent from every selected project. The check respects --save-prod, --save-dev, and --save-optional.

--global, -g#

Видаляє глобальний пакунок.

--save-dev, -D#

Видаляє залежність тільки з devDependencies.

--save-optional, -O#

Видаляє залежність тільки з optionalDependencies.

--save-prod, -P#

Видаляє залежність тільки з dependencies.

--unsafe-perm#

Added in: v11.26.0

Accepted for compatibility with pnpm install; see unsafePerm.

Supply-chain policy flags#

Added in: v11.26.0

pnpm remove accepts the same policy overrides as pnpm install and pnpm add: --trust-lockfile, --no-trust-lockfile, --trust-policy, --trust-policy-exclude, and --trust-policy-ignore-after.

Removing a package rewrites the lockfile, so pnpm remove verifies the whole lockfile against the active policies the way pnpm install does, not only the entries of the package being removed. --trust-lockfile skips that pass entirely.

--filter <package_selector>#

Читайте більше про фільтрування.