commands
userdel — remove a local account
Administrative operation that removes account records. -r additionally removes the home and mail spool where applicable; other files may remain owned by the numeric UID. Never use force as a routine fix. Example is help only. Example assumes a fresh account lab fixture; VM-only examples require explicit authorization.
Formal Syntax & Structure
linux syntaxlinux
userdel [OPTION] LOGINParameters & Attributes
| Name | Type | Description |
|---|---|---|
| -r | option | remove home and mail spool |
| LOGIN | operand | verified account name |
Return Value
exit status and output
Administrative operation that removes account records. -r additionally removes the home and mail spool where applicable; other files may remain owned by the numeric UID. Never use force as a routine fix.
Working Example
Example Snippetlinux
userdel --help >/dev/null && printf "help available\n"