code: def delete(name, root=None):
      '''
      Remove the named group
  
      name
          Name group to delete
  
      root
          Directory to chroot into
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' group.delete foo
      '''
      cmd = ['groupdel']
  
      if root is not None:
          cmd.extend(('-R', root))
  
      cmd.append(name)
  
      ret = __salt__['cmd.run_all'](cmd, python_shell=False)
  
      return not ret['retcode'f delete(name, root=None):
      '''
      Remove the named group
  
      name
          Name group to delete
  
      root
          Directory to chroot into
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' group.delete foo
      '''
      cmd = ['groupdel']
  
      if root is not None:
          cmd.extend(('-R', root))
  
      cmd.append(name)
  
      ret = __salt__['cmd.run_all'](cmd, python_shell=False)
  
      return not ret['retcode']
docs: Remove the named group
  
      name
          Name group to delete
  
      root
          Directory to chroot into
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' group.delete foo