Question: How to Remove a User in Linux?
Contents

Remove a Linux user

  • Log in to your server via SSH.
  • Switch to the root user: sudo su –
  • Use the userdel command to remove the old user: userdel user’s username.
  • Optional: You can also delete that user’s home directory and mail spool by using the -r flag with the command: userdel -r user’s username.

How do you delete a user?

Delete a user

  1. In the Users list, find the user.
  2. Hover over the user you want to delete and click More Delete. (You can also find this option at the top-left of the user’s account page, under More .​)

How do I remove a user from Ubuntu?

Delete a user account

  • Open the Activities overview and start typing Users.
  • Click Users to open the panel.
  • Press Unlock in the top right corner and type in your password when prompted.
  • Select the user that you want to delete and press the – button, below the list of accounts on the left, to delete that user account.
Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest