Deleting Groups
Deleting groups with groupdel
The groupdel command allows a System Administrator to remove groups from their Linux system.
Groupdel Command available Options
Below are the options that can be used by the "groupdel" command.
Usage: groupdel [options] GROUP
Options:
-h, --help display this help message and exit
-R, --root CHROOT_DIR directory to chroot into
Removing Groups - groupdel command
To remove a group we use the "groupdel" command. The syntax for this command is: groupdel groupname
groupdel Group
[root@fedsrv01a ~]# grep testgroup /etc/group
testgroup:x:1011:
[root@fedsrv01a ~]# groupdel testgroup
[root@fedsrv01a ~]# grep testgroup /etc/group
[root@fedsrv01a ~]#
In the above example we used the "groupdel" command to remove a group called "testgroup".