Permanently delete a file.
rm filename
rm unlinks the path from the filesystem. There is no trash can: once unlinked, the data is gone unless you have a backup. Use -i for an 'are you sure' prompt.
Safety: Preview paths and redirections before changing files or streams.
Recursively force-delete a directory and all its contents.
rm -rf dirname
-r recurses into directories; -f suppresses prompts and missing-file errors. Together they delete an entire tree without interaction - irreversible, double-check the path first. Safety note: in a real terminal, verify the exact target and backup path before running this.
Safety: Preview paths and redirections before changing files or streams.
Build the habit: BashDrill drills rm and the rest of the Bash workflow until the safe first move is automatic. Try a Bash drill.