misonoteApp Center

Deno cache on Mac (~/Library/Caches/deno): safe to delete?

Safe to deleteRegenerated automatically; Thermo deletes it outright.

Where it is

  • ~/Library/Caches/deno

What it is

This is Deno's DENO_DIR, which defaults to ~/Library/Caches/deno on macOS. It holds modules fetched by URL or from JSR, npm packages Deno installs for npm: specifiers, and caches of transpiled code and type-checking results.

Why it gets so big

Every version of every dependency your scripts have imported is kept, plus compiled output for each. Running lots of one-off scripts or frequently updating dependencies makes it grow steadily.

Is it safe to delete?

Yes. Deno fetches and compiles everything again on the next run, which needs network access and makes that first run slower. Projects with a lockfile have their re-downloaded dependencies checked against it. Deno's own clean command removes the cache for you.

Tip

Set DENO_DIR if you want the cache somewhere else, for example on an external drive.

See how much space it uses

du -sh "$HOME/Library/Caches/deno" 2>/dev/null

Clean it with the tool’s own command

deno clean

Delete it by hand

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

rm -rf "$HOME/Library/Caches/deno"/*