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
npm
npm install delpnpm
pnpm add delMethods
No methods match this filter.
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.
- If a deletion fails, no new fs.rm calls are started, and the promise rejects with the first error once the already-started fs.rm calls have settled. (https://cdn.jsdelivr.net/gh/sindresorhus/del@latest/readme.md)
- Node.js may continue deleting children of a directory after its recursive fs.rm call rejects. (https://cdn.jsdelivr.net/gh/sindresorhus/del@latest/readme.md)
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.
Report a problem with this API docOpens a pre-filled issue on GitHub.