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] LOGIN

Parameters & Attributes

NameTypeDescription
-roptionremove home and mail spool
LOGINoperandverified 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"
Linux Reference