Skip to content

Is it safe to delete Yarn global cache?

Package archives that all your projects using Yarn 2 or later share.

Usually safe

It can be recreated, but it takes a download, a reinstall or the tool's own command.

~/.yarn/berry/cache

What it is

Yarn 2 and later (Yarn Berry) store each package they download as a zip archive in this shared folder, which every Yarn project on your Mac uses. Projects that use Plug'n'Play, Yarn's default way of installing, load their packages straight from these archives instead of from a node_modules folder. Archives for package versions no project uses anymore stay here until they're removed.

If it's removed

Projects that use Plug'n'Play stop running until their dependencies are installed again with Yarn, which downloads the packages again. Projects with a node_modules folder keep working.

How it's removed

Moved to the Trash, where you can restore it.

PRO

The free analyzer finds it and explains it. Removing it is Pro, after a review sheet that lists every move and command. It's never checked for you: it waits for your choice.

Sources

Last checked on 26 Sep 2026. Every entry is written and checked by hand; the app and the command-line tool use the same words.