RM(1)
β¨ 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), oralways(-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); withall, 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 usermto 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 usingshred(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
- ubuntu stonking: gnu-coreutils 9.10-1ubuntu2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms