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 what a project still needs Jump to heading
Use --except with one or more entry points to remove everything from the cache
except the data those files need:
deno clean --except main.ts
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
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>optionalSelects the node_modules directory mode for npm packages (not a path). One of: auto (create a local node_modules directory and install npm packages into it), manual (use the existing local node_modules directory, do not modify it), none (do not use a local node_modules directory; resolve npm packages from the global cache). Defaults to auto when the flag is passed without a value.
--node-modules-linker<MODE>Sets the linker mode for npm packages (isolated or hoisted).
--vendor<vendor>optionalToggles local vendor folder usage for remote modules and a node_modules folder for npm packages.
