On this page
deno clean
deno clean removes Deno's global module cache directory. See
Modules for more information about how Deno
caches dependencies.
Basic usage Jump to heading
>_
deno clean
Dry run Jump to heading
Preview what would be deleted without actually removing anything:
>_
deno clean --dry-run
Keeping specific caches Jump to heading
Use --except to preserve certain cache types while cleaning the rest:
>_
deno clean --except=npm,jsr
When to use this Jump to heading
Use deno clean when you need to:
- Resolve issues caused by corrupted or stale cached modules
- Free disk space used by cached dependencies
Command line usage:
deno clean [OPTIONS] [except-paths]...Remove the cache directory ($DENO_DIR)
Options Jump to heading
--dry-runShow what would be removed without performing any actions.
--except, -eRetain cache data needed by the given files.
Dependency management options Jump to heading
--node-modules-dir<MODE>optionalSets the node modules management mode for npm packages.
--vendor<vendor>optionalToggles local vendor folder usage for remote modules and a node_modules folder for npm packages.