delgroup
remove groups from the system
TLDR
SYNOPSIS
delgroup [options] groupdelgroup [options] user group
DESCRIPTION
delgroup removes a group from the system or removes a user from a group. It's the Debian/Ubuntu counterpart to groupdel with additional safety features.When called with just a group name, it deletes the group. With both user and group names, it removes the user from that group without deleting the group.
PARAMETERS
--system
Only act if the target is a system group (fail otherwise). Also affects creation logic in adduser.--only-if-empty
Only remove the group if it has no members.--backup
Back up any files deleted (for use with deluser; kept for symmetry).--backup-to dir
Place backups in dir instead of the current directory.--remove-home
(deluser) remove the user's home directory. Listed here only for reference.--group
Force removal of a group even when a user name was given. Avoids ambiguous invocations.-q, --quiet
Suppress informational messages.-v, --verbose
More verbose progress output.--conf FILE
Use an alternate `deluser.conf` configuration file.--help
Display help information.--version
Display version.
CONFIGURATION
/etc/deluser.conf
Controls default behavior for deluser and delgroup operations.
CAVEATS
Requires root privileges. Cannot delete a user's primary group while user exists. Files owned by deleted group keep numeric GID. Debian/Ubuntu specific command.
HISTORY
delgroup is part of the adduser package, created for Debian Linux to provide friendlier user/group management than the low-level commands. It wraps groupdel and gpasswd with additional checks and configuration options.
