Change user_name with your actual system user name and group_name with named of group from which you want to remove user.
Use the following command to remove user jack from sysadmin group.
gpasswd -d jack sysadmin
Add User to Secondary Group
The following command will will add user jack to a secondary group named sysadmin.
usermod -aG sysadmin jack