GROUPDEL(8)
๐ GROUPDEL ๐
okay bestie, welcome to the groupdel page from the System Management Commands girlies โจ this is a groupdel(8) situation, iykyk ๐
โจ NAME โจ
groupdel โ delete a group ๐๏ธโจ
๐ธ SYNOPSIS ๐ธ
groupdel [options] GROUP
๐ฆ DESCRIPTION ๐ฆ
so here's the tea ๐ โ groupdel goes in and modifies the system account files, deleting all the entries that refer to GROUP. every single one. no crumbs left ๐
and like, the group you name has to actually exist first, bestie. you can't delete something that isn't there, that's not how any of this works ๐
๐ OPTIONS ๐
these are the options that apply to groupdel, periodt:
-f,--forceโ this one forces the removal of the group, even if there's some user out here having that group as their primary one ๐ณ it's giving "i said what i said"-h,--helpโ shows you the help message and dips out ๐ซถ-R,--rootCHROOT_DIR โ applies changes in the CHROOT_DIR directory and uses the configuration files from the CHROOT_DIR directory. โ ๏ธ only absolute paths are supported. and no SELINUX support, ngl-P,--prefixPREFIX_DIR โ applies changes in the PREFIX_DIR directory and uses the configuration files from the PREFIX_DIR directory. this one does not chroot and it's intended for preparing a cross-compilation target ๐ง some limitations tho: NIS and LDAP users/groups are not verified. PAM authentication is using the host files. and yeah, no SELINUX support either ๐
๐ญ CAVEATS ๐ญ
listen. listen. you may not remove the primary group of any existing user. like, at all. you have to remove the user before you remove the group. that's the order. the vibe check has been failed otherwise โ
and you should manually check all file systems to make sure no files remain owned by this group. yes, manually. i know. it's giving tedious but it's giving necessary ๐ซก
๐ CONFIGURATION ๐
these configuration variables in /etc/login.defs change how this tool behaves, bestie:
๐ MAX_MEMBERS_PER_GROUP (number)
maximum members per group entry. when the maximum is reached, a new group entry (a whole new line, iconic) is started in /etc/group โ with the same name, same password, and same GID ๐
the default value is 0, meaning there are no limits in the number of members in a group. free range. no cap ๐
this feature (the split group thing) lets you limit the length of lines in the group file. it's useful to make sure that lines for NIS groups are not larger than 1024 characters ๐
if you need to enforce such a limit, you can use 25.
note: split groups may not be supported by all tools (even in the Shadow toolsuite). you should not use this variable unless you really, truly, fr fr need it ๐
๐ FILES ๐
/etc/groupโ group account information ๐/etc/gshadowโ secure group account information ๐
โญ EXIT VALUES โญ
groupdel exits with these values, and each one is telling you something:
0โ success ๐ slay2โ invalid command syntax ๐ฌ6โ specified group doesn't exist ๐ป8โ can't remove user's primary group ๐ซ10โ can't update group file ๐
๐ซถ SEE ALSO ๐ซถ
chfn(1), chsh(1), passwd(1), gpasswd(8), groupadd(8), groupmod(8), useradd(8), userdel(8), usermod(8).
go read those too, they're all in the same friend group bestie ๐ธ
and that's the whole page!! this one's from shadow-utils 4.20.0, dated 07/30/2026 ๐ thanks for coming to my ted talk, now go delete a group (responsibly, and after you've checked those file systems) ๐โจ๐
๐ฆ where this page comes from
- arch rolling: shadow 4.20.0.arch1-1 ยท 0BSD AND BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms