Intermediate
Package: shadow-utils / passwd
userdel
Delete a user account.
Syntax
userdel [options] username
Description
userdel removes a user account from the system. By default the home directory is left in place; the -r flag additionally removes the home directory and mail spool.
Examples
sudo userdel alice
Delete a user account, leaving their home directory intact
sudo userdel -r alice
Delete a user account and their home directory/mail spool
sudo deluser alice
Debian/Ubuntu-friendly equivalent
Check for running processes owned by the user first (pkill -u alice) before deleting.