Managing the package store.
Checks for modified packages in the store.
Returns exit code 0 if the content of the package is the same as it was at the time of unpacking.
Sürüm 2.12.0 ve sonrasında geçerli
Functionally equivalent to
pnpm add, except this adds new packages to the store directly without modifying any projects or files outside of the store.
Removes unreferenced packages from the store.
Unreferenced packages are packages that are not used by any projects on the system. Packages can become unreferenced after most installation operations, for instance when dependencies are made redundant.
For example, during
pnpm install, package
email@example.com is updated to
firstname.lastname@example.org. pnpm will keep
email@example.com in the store, as it does not automatically remove packages. If package
firstname.lastname@example.org is not used by any other project on the system, it becomes unreferenced. Running
pnpm store prune would remove
email@example.com from the store.
pnpm store prune is not harmful and has no side effects on your projects. If future installations require removed packages, pnpm will download them again.
It is best practice to run
pnpm store prune occasionally to clean up the store, but not too frequently. Sometimes, unreferenced packages become required again. This could occur when switching branches and installing older dependencies, in which case pnpm would need to re-download all removed packages, briefly slowing down the installation process.
Please note that this command is prohibited when a store server is running.
Added in: v6.10.0
Returns the path to the active store directory.