Terminal Dojo
Help العربية Sign inGet started

Command library / rm

rm

BashDraft — pending expert review3 practice missions

Delete files and directories

Removes files permanently — there's no trash can in the shell, no undo. -r is required to remove a directory (recursively, including everything inside it); -f suppresses confirmation prompts and missing-file errors, which makes it powerful and dangerous in the same breath.

Practice rm

Usage

rm [-r] [-f] file...

Options and flags

Examples

Common mistakes

rm build/ rm -r build/

rm refuses to remove a directory unless you explicitly ask with -r — this is a deliberate safety brake, not a bug.

Related commands

mvfind