Delete all of a groups local mbox, index, and state files.

    :type group: str
    :param group: group name

    :type identifier: str
    :param identifier: the identifier for the given group.

    :rtype: bool
    :returns: True
421397
def clean_up(group, identifier, date):
    
    #log.error('exception raised, cleaning up files.')
    glob_pat = '{g}.{d}.mbox*'.format(g=group, d=date)
    for f in glob(glob_pat):
        #log.error('removing {f}'.format(f=f))
        try:
            os.remove(f)
        except OSError:
            continue
    glob_pat = '{id}_state.json'.format(id=identifier)
    for f in glob(glob_pat):
        #log.error('removing {f}'.format(f=f))
        try:
            os.remove(f)
        except OSError:
            continue
    return True
889763
def group_memberships_destroy_many(self, ids=None, **kwargs):
        ""
        api_path = "/api/v2/group_memberships/destroy_many.json"
        api_query = {}
        if "query" in kwargs.keys():
            api_query.update(kwargs["query"])
            del kwargs["query"]
        if ids:
            api_query.update({
                "ids": ids,
            })
        return self.call(api_path, query=api_query, method="DELETE", **kwargs)
535089
def _delete(self, identifier=None):
        
        assert identifier is not None, 'identifier argument can not be None.'
        writer = self.index.writer()
        writer.delete_by_term('identifier', identifier)
        writer.commit()
135190
function(sGroup) {
        this.logger.log("Removing from group: " + sGroup);
        if (this.groups[sGroup]) {
            delete this.groups[sGroup];
        }

        this.DDM.removeDDFromGroup(this, sGroup);
    }
899328
async def delete_group_memory(self, memory_id):
        """"""
        act = self.service.action("X_DeleteGroupMemory")
        res = await act.async_call(MemoryID=memory_id)
21806
def _remove_person_from_group(person, group):
    
    from karaage.datastores import remove_accounts_from_group
    from karaage.datastores import remove_accounts_from_project
    from karaage.datastores import remove_accounts_from_institute

    a_list = person.account_set
    remove_accounts_from_group(a_list, group)
    for project in group.project_set.all():
        remove_accounts_from_project(a_list, project)
    for institute in group.institute_set.all():
        remove_accounts_from_institute(a_list, institute)
107486
def delete_group(group_name, region=None, key=None,
                        keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    if not conn:
        return False
    _group = get_group(
        group_name, region, key, keyid, profile
    )
    if not _group:
        return True
    try:
        conn.delete_group(group_name)
        log.info('Successfully deleted IAM group %s.', group_name)
        return True
    except boto.exception.BotoServerError as e:
        log.debug(e)
        log.error('Failed to delete IAM group %s.', group_name)
        return False
262028
def delete_group(self, group_id, force=False):
        
        params = {'force': force}
        response = self._do_request(
            'DELETE', '/v2/groups/{group_id}'.format(group_id=group_id), params=params)
        return response.json()
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)
307497
public void deleteGroupMember(GitlabGroup group, GitlabUser user) throws IOException {
        deleteGroupMember(group.getId(), user.getId());
    }
1123008
def delete(config, group, force):
        """"""
        if not force:
            if not click.confirm(
                    'Confirm that you want to delete group {}'.format(group)):
                sys.exit("Deletion of {} aborted".format(group))

        client = Client()
        client.prepare_connection()
        group_api = API(client)
        group_api.delete(group)
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);
	}
1295970
def delete_group(self, name):
        

        group = self.get_group(name)

        method, url = get_URL('group_delete')

        payload = {
            'apikey': self.config.get('apikey'),
            'logintoken': self.session.cookies.get('logintoken'),
            'contactgroupid': group['contactgroupid']
            }

        res = getattr(self.session, method)(url, params=payload)

        if res.status_code == 200:
            return True

        hellraiser(res)
1228893
def DeleteGroup(r, group, dry_run=False):
    

    query = {
        "dry-run": dry_run,
    }

    return r.request("delete", "/2/groups/%s" % group, query=query)
620923
@Override
    public void deleteGroup(ILockableEntityGroup group) throws GroupsException {
        throwExceptionIfNotInternallyManaged();
        try {
            if (group.getLock().isValid()) {
                removeDeletedGroupFromParentGroups(group);
                deleteGroup((IEntityGroup) group);
            } else {
                throw new GroupsException(
                        "Could not delete group " + group.getKey() + " has invalid lock.");
            }
        } catch (LockingException le) {
            throw new GroupsException("Could not delete group " + group.getKey(), le);
        } finally {
            try {
                group.getLock().release();
            } catch (LockingException le) {
            }
        }
    }
607599
def remove_from_group(self, devices):
        """"""
        ids = {d.id for d in self.devices_in_group()}
        ids.difference_update(self._device_ids(devices))
        self._set_group(ids)
346460
public void deleteGroup(Integer groupId) throws IOException {
        String tailUrl = GitlabGroup.URL + "/" + groupId;
        retrieve().method(DELETE).to(tailUrl, Void.class);
    }