Remove all services and apps from the space.

        Will leave the space itself, call delete_space() if you
        want to remove that too.

        Similar to `cf delete-space -f <space-name>`.
349308
def purge(self):
        
        logging.warning("Purging all services from space %s" %
                (self.name))

        service = predix.admin.cf.services.Service()
        for service_name in self.get_instances():
            service.purge(service_name)

        apps = predix.admin.cf.apps.App()
        for app_name in self.get_apps():
            apps.delete_app(app_name)
1008649
public function delete()
	{
		if ($this->deleted) {
			return;
		}
		$this->deleted = true;

		$left = $this->getLeftValue();
		$spaceUsed = $this->getIntervalSize() + 1;
		$this->repository->delete($this);

		// Free the unused space
		$this->repository->truncate($left, $spaceUsed);
	}
744484
public synchronized void clear()
    {
        for (String keyspaceName : getNonSystemKeyspaces())
        {
            KSMetaData ksm = getKSMetaData(keyspaceName);
            for (CFMetaData cfm : ksm.cfMetaData().values())
                purge(cfm);
            clearKeyspaceDefinition(ksm);
        }

        updateVersionAndAnnounce();
    }
443861
protected function cleanup()
    {
        $this->filesystem->remove($this->tmpFolder);
        $this->root = null;
        $this->urlsets = array();
    }
527585
def clean_pages_from_space(confluence, space_key, limit=500):
    
    flag = True
    while flag:
        values = confluence.get_all_pages_from_space_trash(space=space_key, start=0, limit=limit)
        if len(values) == 0:
            flag = False
            print("For space {} trash is empty".format(space_key))
        else:
            print("Found in space {} pages as trashed {}".format(space_key, len(values)))
            for value in values:
                print("Removing page with title: " + value['title'])
                confluence.remove_page_from_trash(value['id'])
1324936
public void deleteSpaceSync(String spaceId) {
        log.debug("deleteSpaceSync(" + spaceId + ")");
        throwIfSpaceNotExist(spaceId);

        Map<String, String> allProps = getAllSpaceProperties(spaceId);
        allProps.put("is-delete", "true");
        doSetSpaceProperties(spaceId, allProps);

        SpaceDeleteWorker deleteWorker = getSpaceDeleteWorker(spaceId);
        deleteWorker.run();
    }
510375
def removeService(self, service):
        
        for name, wrapper in self.services.iteritems():
            if service in (name, wrapper.service):
                del self.services[name]
                return

        raise NameError("Service %r not found" % (service,))
407336
def delete_all_services(self):
        
        # Raise an exception if we are not a manager
        if not self._manager:
            raise RuntimeError('Services can only be deleted '
                               'on swarm manager nodes')

        service_list = self.get_service_list()
        for services in service_list:
            # Remove all the services
            self._api_client.remove_service(services)
981622
def delete_service(self, service_name, params=None):
        
        if not self.space.has_service_with_name(service_name):
            logging.warning("Service not found so... succeeded?")
            return True

        guid = self.get_instance_guid(service_name)
        logging.info("Deleting service %s with guid %s" % (service_name, guid))

        # MAINT: this endpoint changes in newer version of api
        return self.api.delete("/v2/service_instances/%s?accepts_incomplete=true" %
            (guid), params=params)
222629
def delete_service(self, service: str):
        
        # Raise an exception if we are not a manager
        if not self._manager:
            raise RuntimeError('Services can only be deleted '
                               'on swarm manager nodes')

        # Remove service
        self._api_client.remove_service(service)
1282941
def delete(self, key):
    '''
    '''
    key = self._service_key(key)
    self._service_ops['delete'](key)
187914
async def delete(self):
        """"""
        if self.id == self._origin.Space._default_space_id:
            raise DeleteDefaultSpace("Cannot delete default space.")
        await self._handler.delete(id=self.id)
1014069
def delete_app(self, app_name):
        
        if app_name not in self.space.get_apps():
            logging.warning("App not found so... succeeded?")
            return True

        guid = self.get_app_guid(app_name)
        self.api.delete("/v2/apps/%s" % (guid))
1293535
public void destroy() {
		// Unregister from Hazelcast layer.
		synchronized (getSpaceIDsMutex()) {
			if (this.internalListener != null) {
				this.spaceIDs.removeDMapListener(this.internalListener);
			}
			// Delete the spaces. If this function is called, it
			// means that the spaces seems to have no more participant.
			// The process cannot be done through hazelcast.
			final List<SpaceID> ids = new ArrayList<>(this.spaceIDs.keySet());
			this.spaceIDs.clear();
			for (final SpaceID spaceId : ids) {
				removeLocalSpaceDefinition(spaceId, true);
			}
		}
	}
959013
def remove_unused_resources(issues, app_dir, ignore_layouts):
    
    for issue in issues:
        filepath = os.path.join(app_dir, issue.filepath)
        if issue.remove_file:
            remove_resource_file(issue, filepath, ignore_layouts)
        else:
            remove_resource_value(issue, filepath)
968582
def clean(self):
        
        to_del = []
        for serv in self:
            if not serv.host:
                to_del.append(serv.uuid)
        for service_uuid in to_del:
            del self.items[service_uuid]
806504
protected void removeStreamingHostFromSpaceProps(String spaceId) {
        // Update bucket tags to remove streaming host
        Map<String, String> spaceProps =
            s3Provider.getSpaceProperties(spaceId);
        if (spaceProps.containsKey(STREAMING_HOST_PROP)) {
            spaceProps.remove(STREAMING_HOST_PROP);
            spaceProps.remove(STREAMING_TYPE_PROP);
            unwrappedS3Provider.setNewSpaceProperties(spaceId, spaceProps);
        }
    }