deno clean
deno clean 会移除 Deno 的全局模块缓存目录。有关 Deno
如何缓存依赖的更多信息,请参阅
Modules。
基本用法 Jump to heading
>_
deno clean
试运行 Jump to heading
在不实际删除任何内容的情况下预览将要删除的内容:
>_
deno clean --dry-run
保留特定缓存 Jump to heading
使用 --except 在清理其余缓存类型时保留某些缓存类型:
>_
deno clean --except=npm,jsr
何时使用此命令 Jump to heading
在以下情况下使用 deno clean:
- 解决由损坏或过期的缓存模块引起的问题
- 释放缓存依赖占用的磁盘空间
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.