Remove the named group

    Args:

        name (str):
            The name of the group to remove

    Returns:
        bool: ``True`` if successful, otherwise ``False``

    CLI Example:

    .. code-block:: bash

        salt '*' group.delete foo
353131
def delete(name, **kwargs):
    '''
    
    '''
    if info(name):
        comp_obj = _get_computer_object()
        try:
            comp_obj.Delete('group', name)
            log.info('Successfully removed group %s', name)
        except pywintypes.com_error as exc:
            msg = 'Failed to remove group {0}. {1}'.format(
                name, win32api.FormatMessage(exc.excepinfo[5]))
            log.error(msg)
            return False
    else:
        log.warning('The group %s does not exists.', name)
        return False

    return True
364041
async def delete(self, *names):
        
        count = 0

        for arg in names:
            count += await self.execute_command('DEL', arg)

        return count
414383
def delete(self, name):
    '''
    
    '''
    keys = self._client.keys('%s%s:*'%(self._prefix,name))

    pipe = self._client.pipeline(transaction=False)
    for key in keys:
      pipe.delete( key )
    pipe.execute()

    # Could be not technically the exact number of keys deleted, but is a close
    # enough approximation
    return len(keys)
97972
def remove_context(self, name):
        
        context = self.get_context(name)
        contexts = self.get_contexts()
        contexts.remove(context)
1119666
def delete_group(group_id, tasks=False, cached=Conf.CACHED):
    
    if cached:
        return delete_group_cached(group_id)
    return Task.delete_group(group_id, tasks)
607814
def del_option_by_name(self, name):
        
        for o in list(self._options):
            assert isinstance(o, Option)
            if o.name == name:
                self._options.remove(o)
1001224
def remove_from_group(server_context, user_ids, group_id, container_path=None):
    
    return __make_security_group_api_request(server_context, 'removeGroupMember.api', user_ids,
                                             group_id, container_path)
332765
def remove_from_index(name, key)
      index(name).delete(key)
      index(:"#{name}_to_s").delete(key.to_s)
      index(:"#{name}_to_sym").delete(:"#{key}") if to_sym?(key)
    end
312961
def deluser(name, username, root=None):
    '''
    
    '''
    grp_info = __salt__['group.info'](name)
    try:
        if username in grp_info['members']:
            cmd = 'chgrpmem -m - {0} {1}'.format(username, name)
            ret = __salt__['cmd.run'](cmd, python_shell=False)
            return not ret['retcode']
        else:
            return True
    except Exception:
        return True
647421
def remove_header(self, name):
        
        name_lower = name.lower()
        for index in range(len(self.headers) - 1, -1, -1):
            if self.headers[index][0].lower() == name_lower:
                del self.headers[index]
                return True

        return False
1082852
public boolean deleteGroup(String name)
	{
		if (ADMINISTRATOR_GROUP_ID.equals(name))
		{
			throw new SystemException(String.format("Cannot delete '%s' group.", ADMINISTRATOR_GROUP_ID));
		}

		if (USER_GROUP_ID.equals(name))
		{
			throw new SystemException(String.format("Cannot delete '%s' group.", USER_GROUP_ID));
		}

		if (!isGroupExist(name))
		{
			throw new SystemException(String.format("Group '%s' does not exist.", name));
		}

		if (getGroupUserCount(name) > 0)
		{
			throw new SystemException("Cannot delete a group containing users.");
		}

		return allGroups.remove(name);
	}
1128207
async def xgroup_destroy(self, name: str, group: str) -> int:
        
        return await self.execute_command('XGROUP DESTROY', name, group)
736308
def delete(name, remove=False, force=False):
    '''
    
    '''
    if salt.utils.stringutils.contains_whitespace(name):
        raise SaltInvocationError('Username cannot contain whitespace')
    if not info(name):
        return True

    # force is added for compatibility with user.absent state function
    if force:
        log.warning('force option is unsupported on MacOS, ignoring')

    # remove home directory from filesystem
    if remove:
        __salt__['file.remove'](info(name)['home'])

    # Remove from any groups other than primary group. Needs to be done since
    # group membership is managed separately from users and an entry for the
    # user will persist even after the user is removed.
    chgroups(name, ())
    return _dscl(['/Users/{0}'.format(name)], ctype='delete')['retcode'] == 0
761162
def is_group_name_exists(self, group_name):
        
        groups = self.m["groups"]
        for g in groups:
            if (g["group_name"] == group_name):
                return True
        return False
879055
def remove(cls, name):
        

        client = Client.instance()

        new_current_database = None

        if client.database != name:
            new_current_database = name

        # Deletions are only possible from the system database
        client.set_database(name=SYSTEM_DATABASE)

        api = client.api
        api.database(name).delete()

        if new_current_database:
            client.set_database(name=new_current_database)
1141903
def remove_block(self, name):
        

        if not self._ast or not name in self._block_map:
            raise ValueError(u"Block '{0}' does not exist"
                             .format(common.from_utf8(name)))

        block_idx = self._block_map[name]

        # remove block
        self._ast[2].pop(block_idx)
        del self._block_map[name]
975071
def removed(name):
    '''
    
    '''
    ret = {'name': name, 'result': None, 'comment': '', 'changes': {}}
    if name not in __salt__['pecl.list']():
        ret['result'] = True
        ret['comment'] = 'Pecl extension {0} is not installed.'.format(name)
        return ret

    if __opts__['test']:
        ret['comment'] = ('Pecl extension {0} would have been removed'
                          .format(name))
        return ret
    if __salt__['pecl.uninstall'](name):
        ret['result'] = True
        ret['changes'][name] = 'Removed'
        ret['comment'] = ('Pecl extension {0} was successfully removed.'
                          .format(name))
    else:
        ret['result'] = False
        ret['comment'] = 'Could not remove pecl extension {0}.'.format(name)
    return ret