DEV Community

Discussion on: What is pnpm? Is it really so fast and space-efficient?

Collapse
 
ndaidong profile image
Dong Nguyen

great question, I use pnpm daily and I see it has pnpm prune command, but I never tested it. If it works as same as docker volume prune, it's exactly what we need.

Unfortunately, even the document:

Removes unnecessary packages

It doesn't seems easy to understand how it actually works.

Image description

May Sylwia help us to clarify?

Collapse
 
sylwiavargas profile image
Sylwia Vargas StackBlitz

Thank you, @ndaidong! I think we posted at the same time - yes, you're right about pnpm prune!

Thank you for your questions, @derlin!

Yes, the pnpm cache grows indefinitely basically but there is usually a lot of overlap of dependencies between projects. Pruning the store every once in a while is a good idea. You can do it via pnpm store prune, which removes unreferenced packages that are not used by any project.

Thread Thread
 
ndaidong profile image
Dong Nguyen

You're rock! We need pnpm store prune. Just cleaned :)

Image description