[pappy@chmodx]:$ man rmdir

$ rmdir

Remove empty directories

DOCUMENTEDFiles & directoriesUbuntu 24.04 LTS baseline

Synopsis

rmdir [OPTION]... DIRECTORY...

What it does

Examples

Remove an empty directory
rmdir olddir
Remove empty parents
rmdir -p a/b/c

Important details

These examples are intentionally conservative. Command behavior can still depend on filesystem state, permissions, locale, shell, installed package version, and other system configuration. For exact option semantics, the linked authoritative documentation is the source of truth.