Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Gulp
  3. del

del

MITJavaScriptv8.0.1

A Node.js library for deleting files and directories using glob patterns with a Promise API.

GitHubGitHub
1.3k stars65 forks0 contributors

What is del?

Del is a Node.js library for deleting files and directories using glob patterns. It solves the problem of safely and efficiently removing multiple files with a modern Promise-based API, offering protections against accidental deletion of important directories.

Target Audience

Node.js developers and tooling authors who need programmatic file deletion with pattern matching in build scripts, cleanup tasks, or CLI tools.

Value Proposition

Developers choose Del over alternatives like rimraf for its Promise API, glob support, safety features, and additional options like dry runs and progress tracking.

Overview

Delete files and directories

Use Cases

Best For

  • Cleaning up temporary files in build processes
  • Removing generated assets in development workflows
  • Writing CLI tools that require file deletion
  • Automating cleanup tasks in Node.js applications
  • Safely deleting multiple files with pattern matching
  • Previewing deletions before executing them

Not Ideal For

  • Windows developers using file paths with backward-slashes in glob patterns
  • Users needing a standalone command-line tool without extra dependencies
  • Projects requiring deletion of specific, known paths without any pattern matching overhead

Pros & Cons

Pros

Powerful Glob Support

Enables deletion of multiple files using expressive patterns, as shown in usage examples with inclusions and exclusions like 'temp/*.js' and '!temp/unicorn.js'.

Modern Async API

Provides Promise-based methods with async/await support, making it easy to integrate into contemporary JavaScript codebases, as demonstrated in the deleteAsync function.

Built-in Safety

Defaults to preventing deletion of the current working directory and parent directories, reducing the risk of catastrophic data loss, a key feature highlighted in the description.

Dry Run Capability

Allows previewing what files would be deleted without actual removal, useful for validation and debugging, as shown in the options with dryRun: true.

Cons

Glob Pattern Quirks

The ** pattern can unintentionally match parent directories, requiring explicit ignores to avoid unintended deletions, as warned in the 'Beware' section of the README.

Cross-Platform Caveats

Glob patterns only work with forward-slashes, complicating use on Windows where file paths often use backward-slashes, requiring workarounds like path.posix.join().

Separate CLI Package

For command-line usage, developers must install del-cli separately, adding an extra step and dependency for CLI-focused workflows, as noted in the 'CLI' section.

Frequently Asked Questions

Quick Stats

Stars1,345
Forks65
Contributors0
Open Issues17
Last commit7 months ago
CreatedSince 2014

Tags

#glob-patterns#file-management#cli-tool#nodejs#cross-platform#file-system#promise-api#utilities

Built With

N
Node.js

Included in

Node.js65.5kGulp624
Auto-fetched 1 day ago

Related Projects

autoprefixerautoprefixer

Parse CSS and add vendor prefixes to rules by Can I Use

Stars22,310
Forks1,282
Last commit15 days ago
chokidarchokidar

Minimal and efficient cross-platform file watching library

Stars12,079
Forks621
Last commit4 months ago
fs-extrafs-extra

Node.js: extra methods for the fs object like copy(), remove(), mkdirs()

Stars9,618
Forks783
Last commit7 days ago
globbyglobby

User-friendly glob matching

Stars2,641
Forks135
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub