Join the waitlistJoin
← All cleanup guides
Yarn

Yarn Berry cache: is it safe to delete?

The global cache that Yarn 2 and later keep for every project on this Mac.

Where it lives
  • ~/.yarn/berry/cache
Risk
Low risk. The tool rebuilds it when needed, so SPACE256 preselects it in Review.
Comes back on its own
Yes
If you delete it
The next yarn install downloads its packages again and cannot work offline until it has.
What SPACE256 does
Runs the tool's own cleanup command, only after the tool reports this exact folder, after you confirm in Review with a press and hold.

Cleaned with the tool's own commandyarn cache clean --all

What it is

Yarn 2 and later (Berry) keep a global cache of package archives in ~/.yarn/berry/cache, shared by every project on the Mac, so the same package version is stored once.

Why it grows

Each version of each package your projects ever resolved stays in the cache. Upgrading dependencies over time adds new archives while the old ones remain.

When to clear it

When you need space and your next installs can reach the registry.

When to keep it

If you work offline, or if downloads are slow where you are, the cache saves every project a full download.

How SPACE256 clears it

SPACE256 runs Yarn’s own yarn cache clean --all, only after Yarn reports this exact folder as its global cache.

Questions

Why does `yarn cache clean` need `--all` here?

Yarn 2 and later have a project cache and a global cache. `--all` clears the global one, the folder SPACE256 measures, which every project on this Mac shares.

Will Zero-Install projects break?

No. Projects that commit their cache keep their own `.yarn/cache` folder in the repository; this guide is about the shared global cache in your home folder.

Get SPACE256 at launch