Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

rm

Remove files or directories

Syntax

rm [OPTION]... FILE...

Common Options

-rRecursive removal
-fForce removal
-iPrompt before removal
-vVerbose output
-dRemove empty directories
-IPrompt when removing 3+ files
--preserve-rootProtect root directory

Common Examples

rm file.txt

Remove file

rm -r directory/

Remove directory recursively

rm -rf directory/

Force remove recursively

Related Commands

Related Tools

More Code & Dev Tools