userdel (options) username

userdel is used in Unix / Linux systems to remove a user from the system.

Flags:

-h –help; Display the help/man information and exit

-r –remove; this flag will remove the user’s home directory and associated mail.  If the user is logged in or has processes running, this command will not work.

-f –force; force the removal of the user even if the user is logged in. This should only be used as a last resort as it could potentially damage your file systems.

SYNTAX: # userdel -r/-f/-h username.