How can a user be deleted in Ubuntu?
To delete a user on Ubuntu, you can use the following method:
- To delete a user using the command line tool, open the terminal and use the following command (administrator privileges required):
- Remove a user using the command “sudo deluser
“. - This will remove the specified user and their home directory.
- To delete a user’s home directory without deleting the user itself, you can use the following command (also requiring administrator privileges):
Delete the user’s home directory: If you only want to delete the user’s home directory without deleting the user itself, you can use the following command (also requiring administrator privileges): - Delete the directory named “
” from the /home directory. - This will remove the home directory of the specified user.
Please note that deleting a user will permanently delete the user, including their related files and settings. Before deleting a user, make sure to backup important data or transfer it to another user.