userdel
UsersFundamentals In real LinuxDelete a user
Name: userdel = user delete
This command needs a real Linux system; you can practise it in real Linux mode.
Description
userdel deletes a user account. Files in the home directory are kept unless you add -r, which also removes the home and mail spool. Make sure the user has no running processes first.
Syntax
userdel [OPTION]... USERCommon options
| -r / --remove | Also remove the home directory and mail |
| -f / --force | Remove even if the user is logged in |
Examples
$ sudo userdel -r alice
Delete a user and their home
Explain