RM(1)

๐ŸŽ€ NAME ๐ŸŽ€

okay bestie, welcome to rm(1) โ€” the User Commands girlies' manual page. say hi to rm ๐Ÿ’– โ€” short for remove files or directories. she's iconic, she's powerful, she does NOT do second chances. โœจ


โœจ SYNOPSIS โœจ

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

like. that's it. that's the whole vibe. options first, files after, go off. ๐Ÿ‘‘


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

this manual page documents the GNU version of rm, just so we're clear. rm removes each specified file. and by default? it does NOT remove directories. nope. not happening. she said no. ๐Ÿ™…โ€โ™€๏ธ

okay so here's the prompting tea, and it matters:

  • if you pass -I or --interactive=once, AND there are more than three files or you gave -r, -R, or --recursive, then rm prompts you asking whether to proceed with the entire operation. if your answer isn't affirmative, the entire command is aborted. whole thing. gone. nothing happens. ๐Ÿ’€
  • otherwise, if a file is unwritable, standard input is a terminal, and -f or --force is not given, or you gave -i or --interactive=always, then rm prompts you for whether to remove the file. if your response isn't affirmative, the file is skipped. ๐Ÿ™ˆ

๐Ÿ’… OPTIONS ๐Ÿ’…

Remove (unlink) the FILE(s). ๐Ÿ’ซ

  • -f, --force โ€” ignore nonexistent files and arguments, never prompt. she's not asking. she's just doing it. ๐Ÿ”ฅ
  • -i โ€” prompt before every single removal. every. one. yes bestie, all of them. ๐Ÿซถ
  • -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 ground. ๐ŸŒธ
  • --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. stay in your lane, mount point. ๐Ÿšง
  • --no-preserve-root โ€” do not treat / specially. girl. GIRL. please. ๐Ÿ˜ญ
  • --preserve-root[=all] โ€” do not remove / (this is the default); with all, reject any command line argument on a separate device from its parent. ๐Ÿ›ก๏ธ
  • -r, -R, --recursive โ€” remove directories and their contents recursively. the big one. the whole tree. ๐ŸŒณ
  • -d, --dir โ€” remove empty directories. only empty ones, she's picky like that. ๐ŸŽ€
  • -v, --verbose โ€” explain what is being done. narration on. ๐Ÿ—ฃ๏ธ
  • --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. don't try it. she knows. ๐Ÿ‘€

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

rm -- -foo

rm ./-foo
โš ๏ธ okay important one, listen up: 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). rm is not a shredder, bestie, she's just a deleter. ๐Ÿ—‘๏ธ๐Ÿ’€

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Written by Paul Rubin, David MacKenzie, Richard M. Stallman, and Jim Meyering. legends fr fr. ๐Ÿซกโœจ


๐Ÿ› REPORTING BUGS ๐Ÿ›


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. no cap, that's the actual legal text, don't come for her. ๐Ÿ’…


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

Full documentation <https://www.gnu.org/software/coreutils/rm> or available locally via: info '(coreutils) rm invocation' ๐Ÿ“š


that's the whole page bestie, slay. this was GNU coreutils 9.12, dated September 2026, and it lives at the bottom of the page as RM(1) โ€” mwah, go forth and delete responsibly. ๐Ÿ’–โœจ๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from