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 β€” remove DIRECTORY and its ancestors; e.g., rmdir -p a/b/c is similar to rmdir 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