<p dir="auto">As it's clear for us that Deno caches the deps in a cache folder (as I have in my GNU/Linux box), it'd be much nicer to have the control over deleting a specific version of any cached module with it's deps from the cache folder with a Deno <code class="notranslate">SUBCOMMAND</code> than deleting it manually.</p>
<p dir="auto">Remove the cache files corresponding to the given targets.</p>
<ul dir="auto">
<li><code class="notranslate">deno clean src/mod.ts</code> ≈ <code class="notranslate">rm -f $DENO_DIR/gen/file$PWD/src/mod.ts.{js,map,meta}</code></li>
<li><code class="notranslate">deno clean dir1 dir2</code> ≈ <code class="notranslate">rm -rf $DENO_DIR/gen/file$PWD/{dir1,dir2}</code></li>
<li><code class="notranslate">deno clean https://deno.land</code> ≈ <code class="notranslate">rm -rf $DENO_DIR/{deps,gen}/https/deno.land</code></li>
<li><code class="notranslate">deno clean --remote</code> ≈ <code class="notranslate">rm -rf $DENO_DIR/{deps,gen}/!(file)</code></li>
<li><code class="notranslate">deno clean --history</code> ≈ <code class="notranslate">rm -f $DENO_DIR/deno_history.txt</code></li>
<li><code class="notranslate">deno clean --web-storage=&lt;URLs&gt;</code> ≈ <code class="notranslate">rm -rf $DENO_DIR/web_storage/{&lt;URLs&gt;}</code> refs <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="405972082" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1657" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/1657/hovercard" href="https://github.com/denoland/deno/issues/1657">#1657</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="608987806" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/4981" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/4981/hovercard" href="https://github.com/denoland/deno/issues/4981">#4981</a></li>
<li><code class="notranslate">deno clean --all</code> ≈ <code class="notranslate">rm -rf $DENO_DIR</code></li>
</ul>
<p dir="auto">Due to the current cache structure, cleaning for remote modules can only be done per-domain or coarser.</p>