OS Manuals

/usr/bin/userdel

PAM login and passwd utilities

From shadow 4.20.3-r3 (os), captured 2026-11-05 by running userdel --help (exit 0). permalink

Usage: userdel [options] LOGIN

Options:
  -f, --force                   force some actions that would fail otherwise
                                e.g. removal of user still logged in
                                or files, even if not owned by the user
  -h, --help                    display this help message and exit
  -r, --remove                  remove home directory and mail spool
  -R, --root CHROOT_DIR         directory to chroot into
  -P, --prefix PREFIX_DIR       prefix directory where are located the /etc/* files
  -Z, --selinux-user            remove any SELinux user mapping for the user
Options (6)
OptionDescriptionSource
-f, --forceforce some actions that would fail otherwise e.g. removal of user still logged in or files, even if not owned by the userhelp
-h, --helpdisplay this help message and exithelp
-r, --removeremove home directory and mail spoolhelp
-R, --root CHROOT_DIRdirectory to chroot intohelp
-P, --prefix PREFIX_DIRprefix directory where are located the /etc/* fileshelp
-Z, --selinux-userremove any SELinux user mapping for the userhelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.