public static function remove($groupname)
    {
        $grav = Grav::instance();

        /** @var Config $config */
        $config = $grav['config'];

        $blueprints = new Blueprints();
        $blueprint = $blueprints->get('user/group');

        $type = 'groups';

        $groups = $config->get($type);
        unset($groups[$groupname]);
        $config->set($type, $groups);

        $filename = CompiledYamlFile::instance($grav['locator']->findResource("config://{$type}.yaml"));

        $obj = new Data($groups, $blueprint);
        $obj->file($filename);
        $obj->save();

        return true;
    }