LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

delgroup

remove groups from the system

TLDR

Delete a group
$ sudo delgroup [groupname]
copy
Remove user from group
$ sudo delgroup [username] [groupname]
copy
Delete system group
$ sudo delgroup --system [groupname]
copy
Delete only if empty
$ sudo delgroup --only-if-empty [groupname]
copy

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.

SEE ALSO

groupdel(1), deluser(1), addgroup(1), gpasswd(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid