0

Does deleting/removing a user automatically remove the user from all groups the user was a member in?

1 Answer 1

3

Yes it does.

Check out man pages for userdel command for more info, for example here.

Additionally, pay attention to this part:

USERGROUPS_ENAB (boolean)
If set to yes, userdel will remove the user's group if it contains no more members, and useradd will create by default a group with the name of the user.

You must log in to answer this question.