In Ubuntu 20.04, the function » Delete User »(Delete a user) is carried out either via the command deluser
In the terminal, either via the corresponding alternative of the graphic user interface (GUI). Only Root users or those with privileges sudo
can irreparably delete a user and its files.
Who can delete users?
The « Delete User » action in Ubuntu is only available for users with Root or sudo
. They are the only ones who can delete accounts or add a new user in Ubuntu 20.04.
Professional email address
Discover a new way of treating your emails
- Email address to your name
- AI functions to write perfect emails (optional)
- Secure messaging with anti-spam protection
Ubuntu 20.04: Execute the “Delete User” process via the terminal
deluser
is a simple command to initiate « delete user » under Ubuntu.
Delete a user as a root
If you are connected yourself as a root user, you can use the command deluser
To delete any user. To do this, enter the following code and replace the generic character « nom_utilizer » by the corresponding user:
This command deletes the user, but leave the data associated with its account intact. To change this, use the following command. This also deletes the personal directory and all the files it contains:
# deluser --remove-home nom_utilisateur
bash
Delete a user with privileges sudo
If you are a user non-root (a standard user but having privileges sudo
) and that you wish to delete an account, enter the following code by again replacing the generic nature « nom_utilizer » by the appropriate information:
$ sudo deluser nom_utilisateur
bash
To also delete the files, here is the appropriate command:
$ sudo deluser --remove-home nom_utilisateur
bash
Delete a user in Ubuntu 20.04 via the graphical interface
If you are a user with privileges sudo
For Ubuntu 20.04, you can launch the user deletion process via the graphical interface. To do this, simply follow the following steps:
- Open the account settings.
- Click on » Users ».
- Click on » Unlock ». You will then be invited to enter your password; Confirm after having seized it with « authenticate ».
- Select the user you want to delete.
- Lower right is a button, on which is written » Delete the user »; Click on it to take the final step.
- You will then be asked to confirm the deletion, then if the personal directory of the account must also be deleted. Make your choice and the user will be deleted according to the settings you have defined.

