Skip to main content
On this page

deno clean

deno clean 会移除 Deno 的全局模块缓存目录。有关 Deno 如何缓存依赖的更多信息,请参阅 模块

基本用法 Jump to heading

>_
deno clean

试运行 Jump to heading

在不实际删除任何内容的情况下预览将要删除的内容:

>_
deno clean --dry-run

保留项目仍需要的内容 Jump to heading

使用一个或多个入口点与 --except 一起,移除缓存中的所有内容, 但保留这些文件所需的数据:

>_
deno clean --except main.ts

何时使用此命令 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.

--node-modules-linker<MODE>
Jump to heading

Sets the linker mode for npm packages (isolated or hoisted).

--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