How to delete a user account on Ubuntu Linux
Here are the steps to delete a user account on Ubuntu Linux:
Log in as root or use the
nnsudocommand to run the following commands with administrative privileges:sudo suUse the
nnuserdelcommand to delete the user account. Replaceusernamewith the actual username you want to delete:userdel usernameBy default, the user’s home directory and its contents are not deleted. To delete the home directory, use the following command:
nnrm -rf /home/usernameTo remove the user’s group, use the
nngroupdelcommand:groupdel username
Note: Be careful when deleting user accounts and always make sure to backup important data before making changes.
n(thehubmiddletown.com)