Delete User in Ubuntu: Step-by-Step Guide

To delete an existing user account, you can follow the steps below:

  1. Open the terminal.
  2. Enter the following command to delete a user account:
sudo deluser username

Please replace “username” with the actual username you want to delete. If you also want to delete the user’s home directory and mailbox at the same time, use the following command:

sudo deluser --remove-home username
  1. Please enter your administrator password to confirm the deletion operation.
  2. The user account will be deleted, along with any related files and directories.

Please ensure that you understand the impact on the system and have backed up user data before deleting the user account.

bannerAds