Hostwinds Tutorials
Search results for:
Table of Contents
Tags: Debian
You may find that at some point, you have a user account that is no longer needed and needs to be removed from your server. As always, we suggest making a snapshot backup before making changes to your account and before following this guide.
Deleting a user in Debian is a straightforward process, however before we being you'll need to go ahead and log in to your server via SSH. If this is not something you're familiar with, please refer to our article: Connecting to Your Server Via SSH. There are two different methods for deleting user accounts and virtual users off a Debian installation.
If you'd like to remove the user account but keep all the files associated with that account, use the following command as the root or sudo user. If you are the sudo user, please ensure to use the sudo command before entering in the rest of the command and replacing below with the actual username you would like to delete:
userdel
If you'd like to remove the user account and delete all the files from their home directory and mail spool, use the following command as the root or sudo user. If you are the sudo user, please ensure to use the sudo command before entering the rest of the command
userdel -r
Written by Hostwinds Team / June 12, 2018