Skip to main content
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

Show what would be removed without performing any actions.

--except, -e
Jump to heading

Retain cache data needed by the given files.

Dependency management options Jump to heading

--node-modules-dir<MODE>optional
Jump to heading

Sets the node modules management mode for npm packages.

--vendor<vendor>optional
Jump to heading

Toggles local vendor folder usage for remote modules and a node_modules folder for npm packages.

Last updated on

Did you find what you needed?

Privacy policy