← All commands
Topic hub File Management
Windows Linux File Management Expanded guide File System

Windows del / erase equivalent in Linux

Removes files or directories. Be very careful — Linux has no Recycle Bin by default.

Windows del / erase
→
Linux equivalents
Debian/Ubuntu same command
rm
Fedora same command
rm
Arch same command
rm

Overview

What this command does

On Windows, "del / erase" is used to delete files and folders. On Linux, the closest practical mapping shown here is "rm". Removes files or directories. Be very careful — Linux has no Recycle Bin by default. This reference is grouped under File Management → File System.

Migration tip: <strong>There is no Recycle Bin</strong> in the Linux terminal. Deleted files are gone immediately. Always double-check your command, especially when using wildcards.

Windows → Linux context

What changes when you use this on Linux?

Equivalent task, different tool

Windows del / erase maps to rm for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.

Portable across the compared distros

The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.

Command-specific caution

NEVER run 'rm -rf /' — it deletes your entire system with no undo. Always review commands with wildcards or -rf before pressing Enter.

Practical tasks

Common use cases

Delete files and folders

Removes files or directories. Be very careful — Linux has no Recycle Bin by default.

rm -r

Remove directories recursively

rm -i

Ask before deleting each file

rm -f

Force delete (no prompts)

Ready to run

Copyable Linux commands

Review paths, device names, package names and permissions before running any command.

rm file.txt
rm -i *.tmp
rm -r MyFolder
rm -rf MyFolder

Walkthrough

Examples with explanations

# Windows: del file.txt
rm file.txt               # delete a file
rm -i *.tmp              # delete with confirmation prompt

# Windows: rmdir /s /q MyFolder
rm -r MyFolder          # delete folder and all contents
rm -rf MyFolder         # force delete (no prompts)

Reference

Common options and variations

Command or optionUse
rm -rRemove directories recursively
rm -iAsk before deleting each file
rm -fForce delete (no prompts)
rm -vShow each file being deleted
rmdirRemove an empty directory only

Distro differences

Debian/Ubuntu vs Fedora vs Arch

Debian/Ubuntu, Fedora and Arch all use "rm" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.

DistributionPackage manager / baseEquivalent commandDifference to notice
Debian/Ubuntu same command rm Same command on this distribution.
Fedora same command rm Same command on this distribution.
Arch same command rm Same command on this distribution.

Important

What to watch out for

NEVER run 'rm -rf /' — it deletes your entire system with no undo. Always review commands with wildcards or -rf before pressing Enter.

Keep learning

Related File Management commands