How Do I Delete a Secondary Group in Linux?
Contents How Do I Remove a Secondary Group in Linux? Usermod Command Has -G Option to Set a List of Supplementary Groups Which the User Is Also a Member Of...
How do I remove a secondary group in Linux?
usermod command has -G option to set a list of supplementary groups which the user is also a member of. Each group is separated from the next by a comma, with no intervening whitespace. If the user is currently a member of a group which is not listed, the user will be removed from the group.
Must Read
How do I remove a group in Linux?
Deleting a Group in Linux
To delete(remove) a given group from the system, invoke the groupdel command followed by the group name. The command above removes the group entry from the /etc/group and /etc/gshadow files. On success, the groupdel command does not print any output.