1GROUPDEL(8) System Management Commands GROUPDEL(8)
2
3
4
6 groupdel - delete a group
7
9 groupdel [options] GROUP
10
12 The groupdel command modifies the system account files, deleting all
13 entries that refer to GROUP. The named group must exist.
14
16 The options which apply to the groupdel command are:
17
18 -f, --force
19 This option forces the removal of the group, even if there's some
20 user having the group as the primary one.
21
22 -h, --help
23 Display help message and exit.
24
25 -R, --root CHROOT_DIR
26 Apply changes in the CHROOT_DIR directory and use the configuration
27 files from the CHROOT_DIR directory. Only absolute paths are
28 supported.
29
30 -P, --prefix PREFIX_DIR
31 Apply changes in the PREFIX_DIR directory and use the configuration
32 files from the PREFIX_DIR directory. This option does not chroot
33 and is intended for preparing a cross-compilation target. Some
34 limitations: NIS and LDAP users/groups are not verified. PAM
35 authentication is using the host files. No SELINUX support.
36
38 You may not remove the primary group of any existing user. You must
39 remove the user before you remove the group.
40
41 You should manually check all file systems to ensure that no files
42 remain owned by this group.
43
45 The following configuration variables in /etc/login.defs change the
46 behavior of this tool:
47
48 MAX_MEMBERS_PER_GROUP (number)
49 Maximum members per group entry. When the maximum is reached, a new
50 group entry (line) is started in /etc/group (with the same name,
51 same password, and same GID).
52
53 The default value is 0, meaning that there are no limits in the
54 number of members in a group.
55
56 This feature (split group) permits to limit the length of lines in
57 the group file. This is useful to make sure that lines for NIS
58 groups are not larger than 1024 characters.
59
60 If you need to enforce such limit, you can use 25.
61
62 Note: split groups may not be supported by all tools (even in the
63 Shadow toolsuite). You should not use this variable unless you
64 really need it.
65
67 /etc/group
68 Group account information.
69
70 /etc/gshadow
71 Secure group account information.
72
74 The groupdel command exits with the following values:
75
76 0
77 success
78
79 2
80 invalid command syntax
81
82 6
83 specified group doesn't exist
84
85 8
86 can't remove user's primary group
87
88 10
89 can't update group file
90
92 chfn(1), chsh(1), passwd(1), gpasswd(8), groupadd(8), groupmod(8),
93 useradd(8), userdel(8), usermod(8).
94
95
96
97shadow-utils 4.14.0 10/03/2023 GROUPDEL(8)