RMDIR(1)
π RMDIR(1) π β the General Commands Manual glow-up
okay bestie, pull up a chair π«Ά you're reading the manual page for rmdir, living in section 1 of the General Commands Manual. it's short, it's iconic, it's literally just "delete the folder but only if it's empty" and honestly? we stan a boundary-setting queen π
β¨ NAME β¨
rmdir β Remove the DIRECTORY(ies), if they are empty. that's it. that's the whole job. no cap.
πΈ SYNOPSIS πΈ
rmdir [OPTION]... DIRECTORY...
translation: you give it some OPTIONs (optional, babe), and then one or more DIRECTORYs. you always give it at least one directory. periodt.
π¦ DESCRIPTION π¦
Remove the DIRECTORY(ies), if they are empty. π
like, that's the vibe. if the directory's got stuff in it, rmdir is NOT touching it β she's not messy, she's not doing your spring cleaning for you. empty directories only. iykyk.
π OPTIONS π
--ignore-fail-on-non-emptyβ ignore each failure that is solely because a directory is non-empty. so if the only reason it flopped was "girl this thing has files in it," you just don't hear about it π€«-p,--parentsβ removeDIRECTORYand its ancestors; e.g.,rmdir -p a/b/cis similar tormdir a/b/c a/b a. it's giving "walk up the whole family tree and clear everyone out" π³-v,--verboseβ output a diagnostic for every directory processed. main character energy: she wants you to know exactly what she did π-h,--helpβ Print help. your girl explains herself π¬-V,--versionβ Print version. flexes her number, respectfully β<dirs>β (and yeah, bestie, that's literally just sitting there in the list like that in the original. i'm not gonna pretend it's anything else. leaving it exactly as it is π)
π VERSION π
v(uutils coreutils) 0.12.0
π EXAMPLES π
Remove specific directories:
rmdir path/to/directory1 path/to/directory2 ...
Remove specific nested directories recursively:
rmdir [-p|--parents] path/to/directory1 path/to/directory2 ...
Clean a directory of empty directories:
rmdir *
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. π (fr fr, be gentle with her, she's still growing π§)
and that's the whole page, bestie π she's little but she's fierce. this was the rmdir page from uutils coreutils 0.12.0, dated 2026-09-25 β ily, go make some empty directories, then immediately delete them, it's called self-care πβ¨
π¦ 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