Skip to content
Related Articles

Related Articles

groupdel command in Linux with examples
  • Last Updated : 20 May, 2019

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.

Syntax:

groupdel [options] GROUP

Files:

  • /etc/group : It contains the account information of the Group.
  • /etc/gshadow : It contains the secure group account information.

Exit values: This command exits with the following values.

  • 0: Success
  • 2: Invalid Command Syntax.
  • 6: Specified group doesn’t exist.
  • 8: Can’t remove users primary group.
  • 10: Can’t update group file.

Options:

  • -f –force: It used to delete a group even if it is the primary group of a user.
  • -h –help: It displays the help message and exit.

  • -R –root: It apply the changes in the CHROOT_DIR directory. Also, it uses the configuration files from the CHROOT_DIR directory.
  • My Personal Notes arrow_drop_up
Recommended Articles
Page :