sudo deluser --remove-home your_user deletes the home directories as well as the user entries.

The additional option --remove-all-files even removes all the files owned by the user.

Answer from muclux on askubuntu.com
๐ŸŒ
GoDaddy
godaddy.com โ€บ help โ€บ remove-or-delete-a-linux-user-19158
Remove or delete a Linux user | VPS Hosting - GoDaddy Help US
You can remove old users from your Linux server. This will revoke the user's SSH access, and remove that user's file and directory ownership. To delete a user in Linux, follow these steps.
People also ask

Does `userdel` delete the home directory?
Not by default. Use `userdel -r` to remove the home directory and mail spool along with the account.
๐ŸŒ
linuxize.com
linuxize.com โ€บ home โ€บ linux commands โ€บ how to remove a user in linux
How to Remove a User in Linux | Linuxize
Does deleting a user remove their cron jobs?
No. Run `sudo crontab -r -u username` before deleting the user to remove their scheduled cron jobs.
๐ŸŒ
linuxize.com
linuxize.com โ€บ home โ€บ linux commands โ€บ how to remove a user in linux
How to Remove a User in Linux | Linuxize
How do I undo a user deletion?
You cannot undo `userdel`. If you deleted the home directory with `-r`, the data is gone unless you have a backup. You would need to recreate the user and restore their files.
๐ŸŒ
linuxize.com
linuxize.com โ€บ home โ€บ linux commands โ€บ how to remove a user in linux
How to Remove a User in Linux | Linuxize
๐ŸŒ
Reddit
reddit.com โ€บ r/linux4noobs โ€บ deleting a created user . how to..
r/linux4noobs on Reddit: deleting a created user . how to..
December 3, 2022 -

hi good people

how to delete a created user properly ? , i have created a new user due to testing and i followed instructions from the web on how to delete user , but the user still showing in the login screen

. how to properly delete a user ?

๐ŸŒ
Red Hat
docs.redhat.com โ€บ en โ€บ documentation โ€บ red_hat_enterprise_linux โ€บ 6 โ€บ html โ€บ deployment_guide โ€บ cl-tools-userdel
3.4.5. Deleting Users | Deployment Guide | Red Hat Enterprise Linux | 6 | Red Hat Documentation
Red Hat Enterprise Linux ยท 6 ยท Deployment Guide ยท 3.4.5. Deleting Users ยท If you want to remove a user account from the system, use the userdel command on the command line as root. userdel username ยท Combining userdel with the -r option removes files in the user's home directory along ...
๐ŸŒ
StrongDM
strongdm.com โ€บ blog โ€บ security
How To Delete/Remove Users in Linux (userdel, deluser & Manually)
February 27, 2025 - There are three main ways to safely remove Linux users: 1. Using the userdel Command. 2. Using deluser (Debian-based Systems). 3. Manually Removing a User.
๐ŸŒ
Linuxize
linuxize.com โ€บ home โ€บ linux commands โ€บ how to remove a user in linux
How to Remove a User in Linux | Linuxize
May 6, 2026 - Remove user accounts in Linux with userdel. This guide explains how to delete a user, remove the home directory, handle logged-in users, clean up cron jobs, and find files left behind.
Find elsewhere
๐ŸŒ
KodeKloud
kodekloud.com โ€บ blog โ€บ linux-create-or-remove-user
Linux: Create, or Remove User
July 4, 2025 - Then you can jump straight to picking the password for your new user. Type it once here, and press Enter. Note that nothing will be displayed on the screen while you type. At this prompt, type the password again, and press Enter. This double-checks that you typed the password correctly. If you see this, it confirms the password was changed successfully: If you want to delete the user, but keep the user's home directory, run this command:
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ linux-unix โ€บ userdel-command-in-linux-with-examples
userdel Command in Linux - GeeksforGeeks
April 21, 2026 - The userdel command is used to remove user accounts from the system. It helps administrators delete unused or unauthorized users, ensuring proper access control and maintaining overall system security.
๐ŸŒ
DigitalOcean
digitalocean.com โ€บ community โ€บ tutorials โ€บ how-to-add-and-delete-users-on-ubuntu-20-04
How to Add and Delete Users on Ubuntu | DigitalOcean
March 17, 2026 - The -a flag stands for โ€œappendโ€ and -G specifies the supplementary group. Changes usually take effect upon the userโ€™s next login. By default, the deluser command in Ubuntu (without specific options) deletes the user account but leaves their home directory and mail spool intact.
๐ŸŒ
Pi My Life Up
pimylifeup.com โ€บ home โ€บ how to delete a user on ubuntu
How to Delete a User on Ubuntu - Pi My Life Up
February 24, 2021 - Using the deluser command, we can delete a user on our Ubuntu system with ease. This command is available on most Linux-based operating systems, so it is good to learn how to use it.
๐ŸŒ
nixCraft
cyberciti.biz โ€บ nixcraft โ€บ howto โ€บ linux โ€บ how to delete/remove users in linux using userdel command
Linux Delete / Remove User Account Using userdel command - nixCraft
August 9, 2023 - # userdel userName # userdel [options] userName # userdel -r userName ยท To remove a user, type: $ sudo userdel <user_name> Delete a user in other root directory (cd into the /path/to/dir1/ and then remove it) : $ sudo userdel --root ...
๐ŸŒ
Linux Today
linuxtoday.com โ€บ home โ€บ infrastructure
Delete Users in Linux With Userdel Command | Linux Today
June 21, 2021 - If you want to delete an existing user in Ubuntu or any other Linux distribution, you can use the userdel command in the terminal.
๐ŸŒ
nixCraft
cyberciti.biz โ€บ nixcraft โ€บ howto โ€บ linux โ€บ linux drop user โ€“ remove a linux user
Linux Drop User - Remove a Linux user - nixCraft
February 27, 2022 - In this example, delete a user named tom: # userdel -r tom # id tom # grep ^tom /etc/{passwd,shadow} # ls /home/ You learned how to remove user account from Linux machine. Want to study more?
๐ŸŒ
Server Academy
serveracademy.com โ€บ courses โ€บ linux-server-administration โ€บ creating-modifying-and-deleting-user-accounts
Creating, Modifying, and Deleting User Accounts
In this lesson, we will follow the lifecycle of a user account on a Linux/Unix system from creation, through modification, to deletion.
๐ŸŒ
LabEx
labex.io โ€บ tutorials โ€บ linux-how-to-delete-linux-system-user-435284
How to delete Linux system user | LabEx
Learn how to safely remove Linux system users with step-by-step guidance, covering user deletion commands, security best practices, and system management techniques.
๐ŸŒ
LabEx
labex.io โ€บ questions โ€บ how-to-delete-user-accounts-in-linux-270247
How to Delete User Accounts in Linux | LabEx
July 25, 2024 - Learn how to delete user accounts in Linux using the userdel command and manage associated files and processes for secure system administration
๐ŸŒ
Linux Mint Forums
forums.linuxmint.com โ€บ board index โ€บ main edition support โ€บ beginner questions
How do I delete second user account? - Linux Mint Forums
April 17, 2021 - Hi, thanks. In this (as well as other tutorials) it is suggested to run deluser --remove-home user2 to remove /home for user2, the a/c to be deleted. Because I already ran deluser user2 I get the message back that user2 does not exist anymore. Is rm /home/user2 a safe way to delete its directory ...
๐ŸŒ
DigitalOcean
digitalocean.com โ€บ community โ€บ tutorials โ€บ how-to-add-and-delete-users-on-ubuntu-18-04
How to Add and Delete Users on Ubuntu 18.04 | DigitalOcean
January 26, 2022 - For tasks that require administrator privileges, there is a tool installed on Ubuntu systems called sudo. Briefly, sudo allows you to run a command as another user, including users with administrative privileges. In this guide, youโ€™ll learn how to create user accounts, assign sudo privileges, and delete users.