Skip to main content
On this page

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

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

你找到了你需要的东西吗?

编辑此页面
隐私政策