跳到主内容
Version: 5.x

pnpm remove

Removes packages from node_modules and from the project's package.json.

Aliases: rm, uninstall, un

Options#

--recursive, -r#

When used inside a workspace, removes a dependency (or dependencies) from every workspace package.

When used not inside a workspace, removes a dependency (or dependencies) from every package found in subdirectories.

--global#

Remove a global package.

--save-dev, -D#

Only remove the dependency from devDependencies.

--save-optional, -O#

Only remove the dependency from optionalDependencies.

--save-prod, -P#

Only remove the dependency from dependencies.

--filter <package_selector>#

Read more about filtering.