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.
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.
Also note that the cached directory is located in
~/.yarn-cache/
:yarn cache clean
: cleans that directoryyarn cache list
: shows the list of cached dependenciesyarn cache dir
: prints out the path of your cached directoryRun
yarn cache clean
.Run
yarn help cache
in your bash, and you will see:Ok I found out the answer myself. Much like
npm cache clean
, Yarn also has its ownIn addition to the answer,
$ yarn cache clean
removes all libraries from cache. If you want to remove a specific lib's cache run$ yarn cache dir
to get the right yarn cache directory path for your OS, then$ cd
to that directory and remove the folder with thename
+version
of the lib you want to cleanup.