Skip to content
Related Articles
Get the best out of our app
Open App

Related Articles

groupdel command in Linux with examples

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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


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

Exit values: This command exists 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.


  • -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
Last Updated : 29 Dec, 2022
Like Article
Save Article
Similar Reads
Related Tutorials