Linux Example | Remove a Linux User

This linux example will demonstrate how to remove a linux user.

1. Switch to the root user:

sudo su -

2. Use userdel command to remove a user

userdel tom

tom is a user name.

3. We also can delete that user’s home directory and mail spool by using the -r flag

userdel -r tom