misonoteApp Center

Bun install cache (~/.bun/install/cache): safe to delete?

Safe to deleteRegenerated automatically; Thermo deletes it outright.

Where it is

  • ~/.bun/install/cache

What it is

Bun's package manager stores downloaded packages in a global cache and installs them into each project's node_modules from there. On macOS it uses copy-on-write clones by default, so installs are fast and share disk blocks with the cache.

Why it gets so big

The cache keeps every package version you've installed across all your projects, and it isn't trimmed automatically.

Is it safe to delete?

Yes. Projects that are already installed keep their node_modules; clearing just means the next bun install fetches packages from the network again. Bun's own cache removal command does the same thing.

Tip

Because node_modules files are cloned from the cache, deleting the cache can free less space than its reported size while installed projects still share the same data.

See how much space it uses

du -sh "$HOME/.bun/install/cache" 2>/dev/null

Clean it with the tool’s own command

bun pm cache rm

Delete it by hand

Run in Terminal. Deleting cannot be undone, so check the paths first.

rm -rf "$HOME/.bun/install/cache"/*