Delete a group

@param {String} name
@param {Function} done - done(err)
434421
function deleteGroup(name, done) {
  return getGroup(name, function(getGroupErr, group) {
    if (getGroupErr) {
      return done(getGroupErr);
    }

    if (!group) {
      return done(new Error(`group '${name}' not found`));
    }

    return group.destroy(done);
  });
}
780072
function (thing, group) {
            var pname = kb.any(thing, ns.vcard('fn'))
            var gname = kb.any(group, ns.vcard('fn'))
            var groups = kb.each(null, ns.vcard('hasMember'), thing)
            if (groups.length < 2) {
              alert('Must be a member of at least one group.  Add to another group first.')
              return
            }
            var message = 'Remove ' + pname + ' from group ' + gname + '?'
            if (confirm(message)) {
              var del = [ $rdf.st(group, ns.vcard('hasMember'), thing, group.doc()),
                $rdf.st(thing, ns.vcard('fn'), pname, group.doc())]
              kb.updater.update(del, [], function (uri, ok, err) {
                if (!ok) return complain('Error removing member from group ' + group + ': ' + err)
                console.log('Removed ' + pname + ' from group ' + gname)
                syncGroupList()
              })
            }
          }
656282
function deleteUser(username, done) {
  return getUser(username, function(getUserErr, user) {
    if (getUserErr) {
      return done(getUserErr);
    }

    if (!user) {
      return done(new Error(`user '${username}' not found`));
    }

    user.tokens.forEach((token) => token.destroy());
    user.groups.forEach((group) => { group.members.remove(user.id); group.save(); });
    user.leading.forEach((group) => { group.leaders.remove(user.id); group.save(); });
    user.destroy(done);
  });
}
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)
1209016
function _delete(name) {
    observers[name].unobserve();
    delete observers[name];
    delete u        [name];
    delete shadow   [name];
  }
984096
public function deleteAffinityGroup($name)
    {
        Validate::isString($name, 'name');
        Validate::notNullOrEmpty($name, 'name');

        $context = new HttpCallContext();
        $context->setMethod(Resources::HTTP_DELETE);
        $context->setPath($this->_getAffinityGroupPath($name));
        $context->addStatusCode(Resources::STATUS_OK);

        $this->sendHttpContext($context);
    }
1006704
public synchronized void delete(String name) {
        if (isEmpty(name)) {
            indexedProps.remove(name);
        } else {
            synchronized (context) {
                int scope = context.getAttributesScope(name);
                if (scope != -1) {
                    context.removeAttribute(name, scope);
                }
            }
        }
    }
1312045
function removeCommand($name)
    {
        unset($this->commands[$name]);
        foreach ($this->groups as $key => $commands){
            foreach ($commands as $i => $c){
                if ($c[0] == $name){
                    unset($this->groups[$key][$i]);
                }
            }
        }
    }
1023627
public void removeName(String name)
   {
      indexes.remove(name);
      names.remove(name);
      dirty = true;
   }
974657
public static base_response delete(nitro_service client, String groupname) throws Exception {
		systemgroup deleteresource = new systemgroup();
		deleteresource.groupname = groupname;
		return deleteresource.delete_resource(client);
	}
1041200
public function closeGroup(string $groupName)
    {
        $this->useRedis(function($resource, $redis) use($groupName){
            $key = $this->getGroupNameKey($groupName);
            try{
                $redis->del($key);
                $redis->sRem($this->getGroupsKey(), $groupName);
            }
            catch(\Throwable $ex)
            {

            }
        });
    }
392078
function delete($name)
    {
        if (isset($this->children[$name])){
            $this->children[$name]->parent = null;
            unset($this->children[$name]);
        }else
        if (isset($this->temps[$name])){
            $this->temps[$name]->parent = null;
            unset($this->temps[$name]);
        }
    }
247731
function(elem, name) {
  if (!elem.attribs || !hasOwn.call(elem.attribs, name))
    return;

  delete elem.attribs[name];
}
1306058
function(name, del){
            if (!_map.hasOwnProperty(name)) {
                return;
            }
            var fn = _map[name];
            
            if (del) {
                delete _map[name];
            }
            return fn;
        }
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
542533
public void clearAndCancelActivationGroup(final String name) {
        final InternalActivationGroup activationGroup = this.activationGroups.get( name );
        if ( activationGroup != null ) {
            clearAndCancelActivationGroup( activationGroup );
        }
    }
810904
public static function removeResource ($group, $name = FALSE)
	{
		
		// Remove resource from group
		
		if ($name)
		{
			
			unset (self::$resources[$group][$name]);
			
			// Remove default if set to resource
			
			if (self::getGroupSetting ($group, 'default') == $name)
			{
				self::removeDefault ($group);
			}
			
		}
		
		// Else remove group
		
		else
		{
			unset (self::$resources[$group]);
		}
		
		// Remove group settings if nothing left in the group
		
		if (self::countResourceGroup ($group) < 1)
		{
			unset (self::$resourceSettings[$group]);
		}
		
	}