Yarn cache takes a lot of space

Yarn website says the following:-

Yarn stores every package in a global cache in your user directory on the file system. 
  1. You can use yarn cache list & it will print out every cached package. Just in case you wanted to go through.
  2. You can use yarn cache clean & it will clean the cache (Note that it’s a time taking process and considering your cache size this will be forever!)
  3. You can use yarn cache dir and it will display the path where it’s storing the cache! You know what to do next, use rm -rf yarn-cache-dir this will free up your space and clear all the cache as well.

Note generally your yarn cache dir can be found at ~/.cache/yarn/. In my system the cache is stored in ~/.cache/yarn/v6/.

UPDATE:- It’s recommended to use latest version of yarn.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)