Apps

Bun Cache

Bun keeps a downloaded package cache under its install directory so repeated bun install operations can reuse previously fetched npm package tarballs and extracted package metadata instead of downloading everything again. Over time that cache accumulates old registry responses, package archives, and partially downloaded artifacts from interrupted installs; Kudu removes those cached package files only, leaving project dependencies, lockfiles, settings, accounts, and saved credentials untouched.

Why clean Bun Cache?

  • Corrupted cached npm tarballs from an interrupted download can make bun install fail with integrity, extraction, or unexpected EOF errors until the bad archive is removed
  • Stale package metadata in the download cache can cause Bun to keep resolving an older version than expected, so installs do not match what you see on the registry
  • A large accumulated cache under .bun/install/cache consumes gigabytes of disk space, which users notice as unexplained growth in their home or LocalAppData folder
  • Reusing damaged cached package contents can produce repeatable install failures across multiple projects, making every fresh clone break in the same way on one machine
  • Old cached responses after registry or proxy changes can lead to repeated 404, authorization, or fetch retry errors even though the package is available from the current source
  • Partially written cache files left behind after a crash or forced shutdown can cause Bun to hang longer on dependency resolution or repeatedly retry downloads on the next install
  • If Bun stores package metadata in SQLite-backed cache state, page fragmentation can bloat the cache and slow lookups; VACUUM rewrites the database pages compactly without deleting package rows
What gets cleaned

Cache paths Kudu targets

Windows

%LocalAppData%/.bun/install/cache

macOS

~/.bun/install/cache

Linux

~/.bun/install/cache
Frequently asked

Common questions about Bun Cache

Free & open source

Download Kudu and reclaim your disk space.

Available on Windows, macOS, and Linux. No account required, no feature gates, no telemetry without consent. All cleaning targets are open source and community-auditable.