Deleting sudo-enabled users in Linux
Please use the “Print” function at the bottom of the page to create a PDF.
Valid for VPS+, VPS, Cloud Servers, Dedicated Servers, and Value Servers.
To delete a sudo-enabled user in Linux, complete the following:
Log in as the root user on the desired server.
- Make sure that the user to be deleted is no longer logged in and is not running any processes.
Enter the following command to delete a user and its home directory:
[root@localhost ~]# userdel -r USERNAME
Example
[root@localhost ~]# userdel -r johnsmith
The user will now be deleted.