To delete a user you use the userdel command. You will need to be logged in as root or have sudo privileges. In this example we will delete Bill’s user account.
as root…
userdel bill
as sudo user…
sudo userdel bill
If the user has email or a home directory set up, you can delete that too by using the -r option.
sudo userdel -r bill
For more detailed information about the userdel command, view the built-in help by typing man userdel.