userdel without -r option

in Linux+
Hello everyone, I am a newbie with the linux OS and have been playing around with adding and removing users, after adding a new user, I tried deleting the user using the userdel command without the -r option, using the ls command still shows the user on my PC and if i try to delete the user again, it says such user does not exist even when i use the -r option. What should I do to get rid of the user ? any help will be appreciated
Comments
You deleted the user but kept the files in their home directory intact. If you rm - r their home directory, you'll finish completely removing the user and their files.
That's what happens when you use the userdel cmd. Try doing a man userdel to see what the different flags accomplish.
userdel -f - also deletes files other users might've placed in the deleted user's home directory, even if root put it there. (safer to use userdel -r)
userdel -r - removes the user and their home directory recursively.
userdel - w/o any flags deletes the user but doesn't delete their home folder.
Certs: RHCSA, LFCS: Ubuntu, CNCF CKA, CNCF CKAD | AWS Certified DevOps Engineer, AWS Solutions Architect Pro, AWS Certified Security Specialist, GCP Professional Cloud Architect
Learn: Terraform, Kubernetes, Prometheus & Golang | Improve: Docker, Python Programming
To-do | In Progress | Completed
Or, you can do a find on / for the user and manually delete directories.