Removing a group but conserving users

I was testing the command groupadd in Manjaro xfce and I created some groups with the two users of my computer.
Now I need to delete a group but I also need to conserve the users, which belong to other groups.

I found the command groupdel GROUPNAME

Is there a risk that this command will also delete the users?

Thank you in advance for the answers.

Hi @Jo-ma,

Never done this, but I’d recommend the delgroup command, instead.


Remove a group

If deluser is called with the –group option, or delgroup is called, a group will be removed.

Warning: The primary group of an existing user cannot be removed.

If the option –only-if-empty is given, the group won’t be removed if it has any members left.

No - removing a group is not removing a user.

Removing a group may affect what a user is allowed to do or has access to.

What @linux-aarhus said then :point_up:

Thank you very much for the answer. It was very helpful!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.