How to clear cache in Yarn?

nikjohn picture nikjohn · Oct 12, 2016 · Viewed 196.4k times · Source

I am doing some benchmark tests for Facebook's Yarn. For this, I need to clear my global Yarn cache.

Is there a command available for this? I have force-removed my ~/.yarn-cache folder, but this seems to be quite manual.

Answer

nikjohn picture nikjohn · Oct 12, 2016

Ok I found out the answer myself. Much like npm cache clean, Yarn also has its own

yarn cache clean