🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

del-cli

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

del-cli

Delete files and directories - Cross-platform

latest
Source
npmnpm
Version
7.0.0
Version published
Weekly downloads
449K
-12.71%
Maintainers
1
Weekly downloads
 
Created
Source

del-cli

Delete files and directories

Useful for use in build scripts and automated things.

Note that this does permanent deletion. See trash-cli for something safer.

Install

npm install --global del-cli

Usage

$ del --help

  Usage
    $ del <path|glob> …

  Options
    --force, -f    Allow deleting the current working directory and outside
    --dry-run, -d  List what would be deleted instead of deleting (silent if no matches)
    --verbose, -v  Display the absolute path of files and directories as they are deleted

  Examples
    $ del unicorn.png rainbow.png
    $ del "*.png" "!unicorn.png"

:warning: Windows users: Since $ del is already a builtin command on Windows, you need to use $ del-cli there.

Comparison

Benefits over rimraf CLI: Supports globbing (even on Windows), safer by default as it doesn't allow deleting parent directories, and has a dry-run mode.

Benefits over rm -rf: Cross-platform, safer by default as it doesn't allow deleting parent directories, and has a dry-run mode.

  • del - API for this package
  • trash-cli - Move files and directories to the trash
  • make-dir-cli - Make directories and their parents if needed

Keywords

cli-app

FAQs

Package last updated on 18 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts