The Userdel command
This command modifies the system account files, deleting all entries which refer to login. The named user has to be existing.
Syntax
userdel [-r] login
There is only one option which is used with this command.
-r
This option is used to remove the files in the user's home directory with the home directory. Files situated in other file systems will have to be found and deleted manually.
Note: Userdel does not permit an account to be removed if the user is presently logged in. Any running process that belongs to an account which is being deleted has to be killed. Any NIS attributes on an NIS client required not be removed. That must be performed on the NIS server.
Associated files to be updated whenever the userdel command is used
/etc/passwd - user account information
/etc/shadow - to secure user account information
/etc/group - group information
Practice
# userdel - r dummy1
# userdel - r dummy2
# userdel - r dummy3
The given command userdel will delete the user dummy1, dummy2 and dummy3 and also removing the individual users home files and directories.