userdel

The command that removes a user account, and with -r its home directory too.

In more detail

userdel removes the account from the password, shadow and group files. Without -r the home directory stays behind, owned by a number that no longer has a name, which a later account with the same number would inherit.

Example

userdel -r tmpuser removes the account and its home.

Related terms

Taught in

References

Certification courses