{
    "content": [
        {
            "type": "text",
            "text": "# groupdel (man)\n\n## NAME\n\ngroupdel - delete a group\n\n## SYNOPSIS\n\ngroupdel [options] GROUP\n\n## DESCRIPTION\n\nThe groupdel command modifies the system account files, deleting all entries that refer to\nGROUP. The named group must exist.\n\n## TLDR\n\n> Delete existing user groups from the system.\n\n- Delete an existing group:\n  `sudo groupdel {{group_name}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (3 subsections)\n- **CAVEATS**\n- **CONFIGURATION** (1 subsections)\n- **FILES**\n- **EXIT VALUES**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "groupdel",
        "section": "",
        "mode": "man",
        "summary": "groupdel - delete a group",
        "synopsis": "groupdel [options] GROUP",
        "tldr_summary": "Delete existing user groups from the system.",
        "tldr_examples": [
            {
                "description": "Delete an existing group",
                "command": "sudo groupdel {{group_name}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display help message and exit."
            },
            {
                "flag": "-R",
                "long": "--root",
                "arg": null,
                "description": "Apply changes in the CHROOTDIR directory and use the configuration files from the CHROOTDIR directory."
            },
            {
                "flag": "-P",
                "long": "--prefix",
                "arg": null,
                "description": "Apply changes in the PREFIXDIR directory and use the configuration files from the PREFIXDIR directory. This option does not chroot and is intended for preparing a cross-compilation target. Some limitations: NIS and LDAP users/groups are not verified. PAM authentication is using the host files. No SELINUX support."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "chfn",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/chfn/1/json"
            },
            {
                "name": "chsh",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/chsh/1/json"
            },
            {
                "name": "passwd",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/passwd/1/json"
            },
            {
                "name": "gpasswd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/gpasswd/8/json"
            },
            {
                "name": "groupadd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/groupadd/8/json"
            },
            {
                "name": "groupmod",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/groupmod/8/json"
            },
            {
                "name": "useradd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/useradd/8/json"
            },
            {
                "name": "userdel",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/userdel/8/json"
            },
            {
                "name": "usermod",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/usermod/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-R --root",
                        "lines": 3,
                        "flag": "-R",
                        "long": "--root"
                    },
                    {
                        "name": "-P --prefix",
                        "lines": 5,
                        "flag": "-P",
                        "long": "--prefix"
                    }
                ]
            },
            {
                "name": "CAVEATS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "CONFIGURATION",
                "lines": 2,
                "subsections": [
                    {
                        "name": "MAX___MEMBERS___PER___GROUP (number)",
                        "lines": 14
                    }
                ]
            },
            {
                "name": "FILES",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "EXIT VALUES",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "groupdel - delete a group\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "groupdel [options] GROUP\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The groupdel command modifies the system account files, deleting all entries that refer to\nGROUP. The named group must exist.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "The options which apply to the groupdel command are:\n",
                "subsections": [
                    {
                        "name": "-h --help",
                        "content": "Display help message and exit.\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-R --root",
                        "content": "Apply changes in the CHROOTDIR directory and use the configuration files from the\nCHROOTDIR directory.\n",
                        "flag": "-R",
                        "long": "--root"
                    },
                    {
                        "name": "-P --prefix",
                        "content": "Apply changes in the PREFIXDIR directory and use the configuration files from the\nPREFIXDIR directory. This option does not chroot and is intended for preparing a\ncross-compilation target. Some limitations: NIS and LDAP users/groups are not verified.\nPAM authentication is using the host files. No SELINUX support.\n",
                        "flag": "-P",
                        "long": "--prefix"
                    }
                ]
            },
            "CAVEATS": {
                "content": "You may not remove the primary group of any existing user. You must remove the user before\nyou remove the group.\n\nYou should manually check all file systems to ensure that no files remain owned by this\ngroup.\n",
                "subsections": []
            },
            "CONFIGURATION": {
                "content": "The following configuration variables in /etc/login.defs change the behavior of this tool:\n",
                "subsections": [
                    {
                        "name": "MAX___MEMBERS___PER___GROUP (number)",
                        "content": "Maximum members per group entry. When the maximum is reached, a new group entry (line) is\nstarted in /etc/group (with the same name, same password, and same GID).\n\nThe default value is 0, meaning that there are no limits in the number of members in a\ngroup.\n\nThis feature (split group) permits to limit the length of lines in the group file. This\nis useful to make sure that lines for NIS groups are not larger than 1024 characters.\n\nIf you need to enforce such limit, you can use 25.\n\nNote: split groups may not be supported by all tools (even in the Shadow toolsuite). You\nshould not use this variable unless you really need it.\n"
                    }
                ]
            },
            "FILES": {
                "content": "/etc/group\nGroup account information.\n\n/etc/gshadow\nSecure group account information.\n",
                "subsections": []
            },
            "EXIT VALUES": {
                "content": "The groupdel command exits with the following values:\n\n0\nsuccess\n\n2\ninvalid command syntax\n\n6\nspecified group doesn't exist\n\n8\ncan't remove user's primary group\n\n10\ncan't update group file\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "chfn(1), chsh(1), passwd(1), gpasswd(8), groupadd(8), groupmod(8), useradd(8), userdel(8),\nusermod(8).\n\n\n\nshadow-utils 4.8.1                           02/06/2024                                  GROUPDEL(8)",
                "subsections": []
            }
        }
    }
}