groupdel command is used to delete a existing group. It will delete all entry that refers to the group, modifies the system account files, and it is handled by superuser or root user.
~# groupdel --help Usage: groupdel [options] GROUP Options: -h, --help display this help message and exit -R, --root CHROOT_DIR directory to chroot into -P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files -f, --force delete group even if it is the primary group of a user --extrausers Use the extra users database
- /etc/group : It contains the account information of the Group.
- /etc/gshadow : It contains the secure group account information.
Using groupdel with options:
1. -f, –force: It used to delete a group even if it is the primary group of a user.
2. -h, –help: It displays the help message and exit.
3. -R, –root: It apply the changes in the CHROOT_DIR directory. Also, it uses the configuration files from the CHROOT_DIR directory.