Skip to content

DELETE command

FireBlade edited this page May 8, 2026 · 1 revision

Deletes one or more files.

Usage

delete <SRC>... [options]

Arguments

  • <SRC>
    The file(s) to delete. Can specify multiple files.

Options

Note

The annotations 🪟 and 🐧 indicate that an option is only available on either Windows or Linux, respectively.

  • -u (--preserve-undo, /U) 🪟
    Preserve undo information, if possible.

  • -o (--files-only, /O) 🪟
    Perform the operation only on files (not on folders) if a wildcard file name (*) is specified.

  • -r (--recursive, /R) 🪟
    Recursively operate into subdirectories.

  • /? (/h, -h, --help)
    Show help and usage information.

Aliases

del, rm, remove, destroy

Remarks

The DELETE command deletes one or more files or directories.


Note

The section below applies only to Windows.

Prior to Windows Vista, operations could be undone only from the same process that performed the original operation.

In Windows Vista and later systems, the scope of the undo is a user session. Any process running in the user session can undo another operation. The undo state is held in the Explorer.exe process, and as long as that process is running, it can coordinate the undo functions.

If the source file parameter does not contain fully qualified path and file names, the /U option is ignored.

Clone this wiki locally