yarnpkg/yarn

Autoclean deprecated cache folders (OS X, linux, etc)

Open

#3733 opened on Jun 26, 2017

View on GitHub
 (6 comments) (0 reactions) (0 assignees)JavaScript (41,514 stars) (2,731 forks)batch import
cat-featuregood first issuehelp wantedtriaged

Description

This is more of an enquiry, as I noticed yesterday when going through my disk usage that Yarn was taking up a fair bit of space for it's cache. This is not a problem in itself, but what I found odd is that there were seemingly two cache locations, so I was wondering if Yarn is using both, or if one of them is a legacy location that hasn't been cleaned up.

I found cache files both in my user directory under ~/.yarn-cache as well as in~/Library/Caches/Yarn.

I cleaned up both and from what it seems only the Library one has been recreated. Is this the one in use now? If so it might be a good idea to have yarn auto-clean the old location if there's still files present there.

Contributor guide