Where Does Deno Keep Its Module and Remote Cache?
Deno DENO_DIR cache folder on Windows, macOS and Linux for remote modules, npm packages and build output.
Last updated
Deno caches remote modules, npm packages and incremental build output in a single directory controlled by DENO_DIR. The defaults follow each OS cache convention.
The cache is disposable by design. Lockfiles and package manifests fully describe what to refetch, so wiping it is routine troubleshooting.
Where Deno stores this, by platform
%LOCALAPPDATA%\deno
Holds remote modules, npm cache and build artifacts. Override with the DENO_DIR environment variable.
~/Library/Caches/deno
Same role. Override with DENO_DIR. Wipe with deno clean rather than rm when possible.
~/.cache/deno
Follows the XDG cache home. Custom XDG_CACHE_HOME values relocate it automatically.
Frequently asked questions
How do I move the Deno cache?
Set the DENO_DIR environment variable to the new folder before running anything. Deno uses it for all cached data and refetches what is missing.
How do I clear the Deno cache?
Run deno clean. It empties the cache safely. The next run refetches dependencies, so expect slower first runs afterward.
Notice an outdated path? Let us know.