WindowsmacOSLinux

Where Does Bun Store Its Install Cache?

Bun ~/.bun/install/cache plus the global packages dir and BUN_INSTALL overrides.

Last updated

Bun caches packages under .bun/install/cache in your home folder, with global installs beside it. BUN_INSTALL relocates the root when set.

Bun versions move fast, so confirm with the install cache dir command. Clearing the cache only costs re download time on next install.

Where Bun stores this, by platform

Windows
%USERPROFILE%\.bun\install\cache

Windows support tracks releases closely; exact layout may vary by version. Print with the pm cache dir command.

macOS
~/.bun/install/cache

Same layout. BUN_INSTALL env var overrides the .bun root when customized.

Linux
~/.bun/install/cache

Same layout. The pm cache rm command wipes it safely.

Frequently asked questions

How do I print the Bun cache path?

Run the package manager cache dir subcommand. It resolves install root overrides for you.

Where do bun add -g packages go?

Under .bun/install/global beside the cache. That bin dir belongs on PATH for the commands to resolve.

Notice an outdated path? Let us know.