Files
pnpm/pnpm11/docs/cli/pm.md
Zoltan Kochan 07839df5c3 docs: move product documentation beside its implementation (#16385)
* docs: move website documentation into the pnpm repository

* docs: keep v11 and v12 documentation beside their implementations

* docs(pnpr): keep registry documentation beside its implementation

* ci: classify product documentation as documentation changes

* test: cover product documentation in Rust CI exclusions

* ci: isolate documentation publishing and support manual sync

* test: make dependency status fixture timestamps deterministic
2026-09-29 15:56:43 +02:00

29 lines
697 B
Markdown

---
id: pm
title: pnpm pm
---
The `pnpm pm <command>` syntax always runs the built-in pnpm command, bypassing any same-named script in `package.json`.
Some built-in commands can be overridden by scripts. For example, if your project defines a `"clean"` script in `package.json`, then `pnpm clean` runs that script instead of the built-in [`pnpm clean`](./clean.md). Using `pnpm pm clean` forces the built-in command to run.
## Example
```json title="package.json"
{
"scripts": {
"clean": "rm -rf dist"
}
}
```
```sh
# Runs the "clean" script from package.json
pnpm clean
# or explicitly:
pnpm run clean
# Runs the built-in pnpm clean command (removes node_modules)
pnpm pm clean
```