RM(1)
π RM(1) β the remove/unlink era π
okay bestie, welcome to the General Commands Manual, the rm page, and yes this is the one that can end your whole career if you're not paying attention π«Ά be so fr right now, we're reading it together.
β¨ NAME β¨
rm β Remove (unlink) the FILE(s) π
πΈ SYNOPSIS πΈ
rm [OPTION]... FILE...
π¦ DESCRIPTION π¦
Remove (unlink) the FILE(s). that's it. that's the whole job description, and yet it's the most powerful little thing in your terminal, no cap π
π OPTIONS π
so many little switches, so much power, let's get into it bestie:
-f,--forceβ ignore files and args that don't even exist, and never prompt. it just goes. iconic, kinda scary π«£-iβ prompt before every single removal. yes, every one. she asks permission each time, respectful queen β¨-Iβ prompt once before removing more than three files, or whenever it's removing recursively. less intrusive than-i, but still giving you some protection against most mistakes. lowkey the sweet spot π₯°--interactive[=<WHEN>]β prompt according to WHEN:never,once(that's-I), oralways(that's-i). if you don't give a WHEN at all, it prompts always. Possible values:alwaysoncenever
--one-file-systemβ when removing a hierarchy recursively, skip any directory that lives on a file system different from the one of the corresponding command line argument. (NOT IMPLEMENTED) so like, it's here, it's listed, it does not do the thing. noted π--no-preserve-rootβ do NOT treat/specially. bestie. BESTIE. why. π--preserve-root[=<all>]β do not remove/(this is the default btw, thank god); withall, reject any command line argument that's on a separate device from its parent. Possible values:all
-r,--recursiveβ remove directories and all their contents, recursively, all the way down, the whole tree π³βοΈ-d,--dirβ remove empty directories. only empty ones, she's picky π-v,--verboseβ explain what is being done. she narrates her own slay π€-g,--progressβ display a progress bar. note: this feature is not supported by GNU coreutils. π-h,--helpβ print help π«Ά-V,--versionβ print version π[files]β the files, bestie. the ones getting unlinked.
π EXTRA π
By default, rm does not remove directories. you gotta use the --recursive (-r or -R) option to remove each listed directory too, along with all of its contents. no vibes-based exceptions, that's just the rule β¨
To remove a file whose name starts with a -, for example -foo, use one of these commands:
rm -- -foo
rm ./-foo
Note that 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 truly unrecoverable, consider usingshred. π«£ so like, deletion is not always forever, iykyk
β VERSION β
v(uutils coreutils) 0.12.0
π EXAMPLES π
Remove specific files:
rm path/to/file1 path/to/file2 ...
Remove specific files ignoring nonexistent ones:
rm [-f|--force] path/to/file1 path/to/file2 ...
Remove specific files interactively prompting before each removal:
rm [-i|--interactive] path/to/file1 path/to/file2 ...
Remove specific files printing info about each removal:
rm [-v|--verbose] path/to/file1 path/to/file2 ...
Remove specific files and directories recursively:
rm [-r|--recursive] path/to/file_or_directory1
path/to/file_or_directory2 ...
Remove empty directories (this is considered the safe method):
rm [-d|--dir] path/to/directory
The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail. π§
okay and that's the whole page bestie, mwah π also real quick, the classic manpage console is General Commands Manual, and this version is stamped 2026-09-25 and comes from uutils coreutils β so go forth, be careful with that /, and remember: with great -r comes great responsibility πΈππ
π¦ where this page comes from
- ubuntu stonking: rust-coreutils 0.12.0-1ubuntu2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms