Skip to content
TrySitePrice

How to delete a user account on Ubuntu Linux

Best/Tutorial

Here are the steps to delete a user account on Ubuntu Linux:

  1. Log in as root or use the sudo command to run the following commands with administrative privileges:

    nn 
    sudo su
  2. Use the userdel command to delete the user account. Replace username with the actual username you want to delete:

    nn 
    userdel username
  3. By default, the user’s home directory and its contents are not deleted. To delete the home directory, use the following command:

    nn 
    rm -rf /home/username
  4. To remove the user’s group, use the groupdel command:

    nn 
    groupdel username

Note: Be careful when deleting user accounts and always make sure to backup important data before making changes.

n(thehubmiddletown.com)