Ubuntu users can delete their user profiles by using the following steps:
- Open a terminal and type “sudo userdel”.
- The sudo user will be asked to confirm the deletion. If you do not have sudo privileges, you will need to type “no” in the prompts to continue without being asked.
- The user profiles will be deleted and you will need to re-login to Ubuntu to continue using the account.
Delete User Profile Using Command-line (Ubuntu 16. 04 LTS)
I recently had this issue when I was trying to create a nonadministrator user and ended up creating an admin one because of some unknown reason, the thing is I didn’t have time to fix it and my colleague needed it immediately so he could do some work with it before the deadline. So, there wasn’t much choice left for me than deleting the newly created admin
When you have root-level access to your Ubuntu box, you can use the userdel utility to remove users. It is a pretty easy process:
userdel username
This will remove everything for that particular user in your system (home directory, mail spool, etc). By “everything” I mean even the user’s permissions from /etc/passwd and /etc/shadow files. You should be careful with this command as there are no return values or any kind of error checking while removing a user account. If anything goes wrong, it may lead to an “incomplete” removal and restore process that will produce unexpected results. Also note that if the same username is reassigned to another person before the above process completes, then the deleted user’s files will NOT be removed.
Using SSH, log into your server. Use the sudo su – command to switch to the root user. To delete a user’s account, use the userdel command with the user’s username:
Open the terminal program. Connect to the server using the ssh [email protected] command. To delete a user account on Ubuntu, use sudo deluser –remove-home username here
Select “Family & Other Users” from the left pane on the Accounts screen. On the Accounts page, scroll down to the Other users section and select an account. Observe that local accounts are labeled as such.