RM(1)

πŸ“¦
version 9.10 Β· 5 versions
, in ubuntu stonking

✨ RM(1) ✨

okay bestie, welcome to the rm page πŸ’– this is a User Commands situation, so like... shell-adjacent, very main character energy. let's get into it 🫢


🌸 NAME 🌸

rm β€” remove files or directories πŸ’… like, the delete button but make it terminal.


πŸ¦‹ SYNOPSIS πŸ¦‹

rm [OPTION]... [FILE]...

πŸ’œ DESCRIPTION πŸ’œ

so this page documents the GNU version of rm. rm removes each specified file. by default, it does not remove directories (not me being cautious πŸ’€).

if the -I or --interactive=once option is given, and there are more than three files, or the -r, -R, or --recursive are given, then rm prompts the user for whether to proceed with the entire operation. if the response is not affirmative, the entire command is aborted. no takebacks, no halfsies βœ‹

otherwise, if a file is unwritable, standard input is a terminal, and the -f or --force option is not given, or the -i or --interactive=always option is given, rm prompts the user for whether to remove the file. if the response is not affirmative, the file is skipped. she asked first, as she should πŸ’–


πŸŽ€ OPTIONS πŸŽ€

Remove (unlink) the FILE(s). ✨

  • -f, --force β€” ignore nonexistent files and arguments, never prompt. she simply does not care πŸ’…
  • -i β€” prompt before every removal. she will ask you every single time, and honestly? valid.
  • -I β€” prompt once before removing more than three files, or when removing recursively; less intrusive than -i, while still giving protection against most mistakes. the chill middle child 🧚
  • --interactive[=WHEN] β€” prompt according to WHEN: never, once (-I), or always (-i); without WHEN, prompt always.
  • --one-file-system β€” when removing a hierarchy recursively, skip any directory that is on a file system different from that of the corresponding command line argument. she stays in her lane πŸ¦‹
  • --no-preserve-root β€” do not treat / specially. 😭 bestie. bestie.
  • --preserve-root[=all] β€” do not remove / (default); with all, reject any command line argument on a separate device from its parent. she protec πŸ’œ
  • -r, -R, --recursive β€” remove directories and their contents recursively. it's giving into the void.
  • -d, --dir β€” remove empty directories.
  • -v, --verbose β€” explain what is being done. she's keeping receipts πŸ‘‘
  • --help β€” display this help and exit.
  • --version β€” output version information and exit.

by default, rm does not remove directories. use the --recursive (-r or -R) option to remove each listed directory, too, along with all of its contents.

any attempt to remove a file whose last file name component is . or .. is rejected with a diagnostic. she said no 🚫

to remove a file whose name starts with a -, for example -foo, use one of these commands:

rm -- -foo
rm ./-foo
⚠️ lowkey important warning time ⚠️ if you use rm to remove a file, it might be possible to recover some of its contents, given sufficient expertise and/or time. for greater assurance that the contents are unrecoverable, consider using shred(1). no cap β€” deleted is not always deleted πŸ’€πŸ™ˆ

🌈 AUTHOR 🌈

Written by Paul Rubin, David MacKenzie, Richard M. Stallman, and Jim Meyering. legends, honestly πŸ‘‘


πŸ“’ REPORTING BUGS πŸ“’

Report bugs to: bug-coreutils@gnu.org

GNU coreutils home page: <https://www.gnu.org/software/coreutils/>

General help using GNU software: <https://www.gnu.org/gethelp/>

Report any translation bugs to <https://translationproject.org/team/>


🫢 SEE ALSO 🫢

unlink(1), unlink(2), chattr(1), shred(1)

Full documentation <https://www.gnu.org/software/coreutils/rm>

or available locally via: info '(coreutils) rm invocation'

Packaged by Ubuntu (9.10-1ubuntu2)

Copyright Β© 2026 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.


and that's the whole page, bestie πŸ’– this was GNU coreutils 9.10, dated August 2026, from the RM(1) crew. now go forth and delete responsibly β€” or don't, she's not your mom πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from