Remove devDependencies from workspace package installs for production prep.
Section: Deploy, Catalogs, and Workspace Features
Prune node_modules in all packages
bash
bash
pnpm -r prune --prodExplanation
Remove devDependencies from workspace package installs for production prep.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Deploy, Catalogs, and Workspace Features
Deploy one workspace package
Copy a package with isolated production dependencies to a target directory.
Define a workspace catalog
Define reusable dependency versions in a workspace catalog.
Publish changed workspace packages
Publish all packages in a workspace whose new versions are not yet in the registry.
Create pnpm-workspace.yaml
Define the workspace root and included package globs.