Definition:
To remove a user from your system, type this command, and the user will be deleted after execution.
Syntax:
userdel [options] usernameOptions:
- -r → This option deletes the user and also removes their home directory along with all files inside it.
 Example:
 userdel -r username
- -f → This option forcefully deletes the user, even if they are logged in or have running processes.
 Example:
 userdel -f username
- -Z → If SELinux is enabled, this option deletes any SELinux user mapping connected to that user.
 Example:
 userdel -Z username
Example:
userdel prabhaOutput:
Prabha was deleted successfully.
