LinuxmacOSWindows

Where Does Corepack Store Shims and Cache?

Corepack keeps downloaded package managers in a cache folder and shims on PATH, keyed to each project's packageManager field.

Last updated

Corepack ships with Node and fetches the exact yarn or pnpm release each project declares. Those downloads land in a cache folder while tiny shims on PATH route commands to them.

The design means versions multiply on disk over time. Clearing the cache only costs redownloads, and pinning per project keeps teammates on identical tooling without global installs.

Where Corepack stores this, by platform

Linux
~/.cache/node/corepack

Downloaded package manager versions. Shims live beside the node install. Projects declare theirs in package.json under packageManager.

macOS
~/Library/Caches/node/corepack

Same role on Mac. Homebrew and installer Node builds share the scheme. Delete the folder to force fresh downloads of pinned managers.

Windows
%LOCALAPPDATA%\node\corepack

Same cache on Windows. Shims sit in the Node install dir on PATH. A corrupted download clears by emptying this folder.

Frequently asked questions

how do i fix corepack signature errors

Empty the corepack cache folder for your OS and rerun the command. A half downloaded manager archive is the usual cause, and refetching resolves it.

where does corepack get the yarn version from

The packageManager field in package.json, set with corepack use. No field means the bundled default, which varies by Node release.

Notice an outdated path? Let us know.