pnpm remove
Aliases: rm, uninstall, un, uni
Видаляє пакунки з node_modules та з `package.json проєкту.
pnpm remove <pkg>...
Without a --save-* option, the package is removed from every dependency field.
Параметри#
--recursive, -r#
У разі використання всередині робочої області видаляє залежність (або залежності) з кожного пакунка робочої області.
При використанні не всередині робочої області, видаляє залежність (або залежності) з кожного пакунка знайденого у вкладених теках.
--global, -g#
Remove a global package and unlink its bins from the global bin directory.
--save-dev, -D#
Видаляє залежність тільки з devDependencies.
--save-optional, -O#
Видаляє залежність тільки з optionalDependencies.
--save-prod, -P#
Видаляє залежність тільки з dependencies.
--lockfile-only#
Update package.json and pnpm-lock.yaml without changing node_modules.
--lockfile-dir <dir>#
The directory in which pnpm-lock.yaml is created. It cannot be combined with --global.
--[no-]trust-lockfile#
Added in: v12.3.0
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, as the trustLockfile setting does. --no-trust-lockfile verifies the lockfile even when the configuration trusts it.
The policy settings also take their pnpm install spellings here: --trust-policy, --trust-policy-exclude, and --trust-policy-ignore-after.