del-cli is an npm command-line utility for deleting files and directories by path or glob. You can preview matching targets with --dry-run before deleting; actual deletion is permanent. On Windows, run the package as del-cli because del is already a built-in command.
Install del-cli
The project README documents a global npm installation:
npm install --global del-cli
After installation, the command syntax is del <path|glob> …. On Windows, use del-cli instead of del to avoid the built-in command name.
Delete files or directories by path
Pass one or more paths to the command. For example, a command such as del build/output.js targets that file; replace the example with the path you intend to remove. The README documents deletion by path, but the exact path must match a file or directory in your environment. [del-cli README]
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →#1 Best Overall
Use glob patterns to target groups of files
A glob lets you select files by a pattern rather than naming each one. The project gives this example, which targets PNG files while excluding unicorn.png:
del "*.png" "!unicorn.png"
Quote glob patterns so the command-line shell does not expand them before del-cli processes them. The project says globbing works on Windows as well. Check the pattern carefully: anything it matches is eligible for permanent deletion.
Rank #2
Preview targets before deleting
Use --dry-run (or -d) to list what would be deleted without removing it:
del --dry-run "*.png" "!unicorn.png"
The option is silent when there are no matches. If nothing is listed, do not assume the pattern was correct; inspect the working directory and pattern before running a destructive command. [del-cli README]
Rank #3
Options and their effects
| Option | Effect | When to use it |
|---|---|---|
--dry-run, -d |
Lists targets that would be deleted instead of deleting them; produces no output if there are no matches. | Preview a path or glob before running the deletion. |
--verbose, -v |
Displays absolute paths as they are deleted. | See which paths are removed during a command. |
--force, -f |
Allows deleting the current working directory and paths outside it. | Only when you deliberately need to target those locations and have verified the paths. |
Deletion is permanent. Be especially cautious with --force: it removes the default boundary that prevents deleting the current working directory or paths outside it. Preview targets first and omit the option unless it is required. [del-cli README]
What safety protections does del-cli provide?
The project describes del-cli as safer by default than the rimraf CLI and rm -rf because it disallows deleting parent directories and includes a dry-run mode. That is the project’s characterization, not an independent comparison or guarantee that a mistaken pattern cannot delete wanted files. Use a preview and verify the target paths before proceeding.
Rank #4
Version and license
The npm listing identifies del-cli as version 7.0.0 under the MIT license. Its page displays a relative publication age, not a precise release date, so that age should not be treated as a dated release record. Check the npm package listing for current package metadata.
For safer manual deletion
The del-cli README points to trash-cli as an option for manual deletion. The related del library documentation also distinguishes its API from trash-cli, describing the latter as a safe version suited to running by hand. That makes it an alternative to consider when working interactively rather than in an automated cleanup task.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

