Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/js/deno.ts>remove

A modern runtime for JavaScript and TypeScript.
Go to Latest
function remove
import { remove } from "https://deno.land/x/deno@v0.28.0/cli/js/deno.ts";

Removes the named file or directory. Would throw error if permission denied, not found, or directory not empty if recursive set to false. recursive is set to false by default.

  await Deno.remove("/path/to/dir/or/file", {recursive: false});

Parameters

path: string
optional
options: RemoveOption = [UNSUPPORTED]

Returns

Promise<void>