API Reference

del

Delete files and directories with glob patterns and error-safe promise return values.

Official Documentation ↗
CompatibilityThis documentation covers version v7.1.0. Check the official docs for the latest API surface.

Installation

npmnpm install del
pnpmpnpm add del

Methods

del is delete files and directories with glob patterns and error-safe promise return values.

Key Features

Installation

npm install del

Usage

Errors

The following points are quoted verbatim from the official documentation. 来源:https://cdn.jsdelivr.net/gh/sindresorhus/del@latest/readme.md · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:49:14.049Z. Any error type, throw condition or recovery step not stated there is left unspecified; this page does not infer exception classes or return values.

FAQ

Is del cross-platform?
Yes, del works on Windows, macOS, and Linux, normalizing paths and permission modes.
Does del handle EMFILE errors?
Yes, del gracefully retries on too many open files, avoiding EMFILE crashes.
Are operations atomic?
Atomic variants write to a temp file then rename, preventing partial reads during concurrent writes.