[pappy@chmodx]:$ man rm

$ rm

Remove files or directories

DOCUMENTEDFiles & directoriesUbuntu 24.04 LTS baseline
Use care. This command removes directory entries. With recursive options it can remove directory trees and their contents. Verify the path before executing it, especially as root.

Synopsis

rm [OPTION]... FILE...

What it does

Examples

Remove a file
rm old.txt
Remove a directory tree
rm -r old-project/
Prompt before each removal
rm -i file.txt

Important details

These examples are intentionally conservative. Command behavior can still depend on filesystem state, permissions, locale, shell, installed package version, and other system configuration. For exact option semantics, the linked authoritative documentation is the source of truth.