Manual:$wgRemoveGroups

Details
If a group can remove any right (example: bureaucrats can remove any right):

If a group remove only some rights (example: bureaucrats can remove only sysop and bot groups):