Deletes the current framework

        :param force: If True, stops the framework before deleting it
        :return: True if the framework has been delete, False if is couldn't
432989
def delete(self, force=False):
        
        if not force and self._state not in (
            Bundle.INSTALLED,
            Bundle.RESOLVED,
            Bundle.STOPPING,
        ):
            _logger.warning("Trying to delete an active framework")
            return False

        return FrameworkFactory.delete_framework(self)
202288
public void forceClean() {
    while(true) {
      PathDeletionContext context = null;
      try {
        context = cleanupThread.queue.poll(50L, TimeUnit.MILLISECONDS);
        if (context == null) {
          return;
        }
        if (!deletePath(context)) {
          LOG.warn("forceClean:Unable to delete path " + context.fullPath);
        }
        else {
          LOG.info("foceClean DELETED " + context.fullPath);
        }
        
      } catch (InterruptedException e) {
        return;
      } catch (Exception e) {
        LOG.warn("Error deleting path " + context.fullPath + ": " + e);
      } 
    }
  }
751497
private boolean delete(final File f) throws IOException {

		if (f.isDirectory()) {
			final File[] files = f.listFiles();
			if (files != null) {
				for (File file : files) {
					final boolean del = delete(file);
					if (!del) {
						return false;
					}
				}
			}
		} else {
			return f.delete();
		}

		// Now directory is empty
		return f.delete();
	}
653954
def release(self, force=False):
		
		
		D = self.__class__
		collection = self.get_collection()
		identity = self.Lock()
		
		query = D.id == self
		
		if not force:
			query &= D.lock.instance == identity.instance
		
		previous = collection.find_one_and_update(query, {'$unset': {~D.lock: True}}, {~D.lock: True})
		
		if previous is None:
			lock = getattr(self.find_one(self, projection={~D.lock: True}), 'lock', None)
			raise self.Locked("Unable to release lock.", lock)
		
		lock = self.Lock.from_mongo(previous[~D.lock])
		
		if lock and lock.expires <= identity.time:
			lock.expired(self)
		
		identity.released(self, force)
96202
def delete(self):
        
        url = self._api
        return self._boolean(
            self._delete(url, headers=Release.CUSTOM_HEADERS),
            204,
            404
        )
555037
def destroy(force=false)
      unless exists?
        raise ContainerError, "Container does not exist."
      end

      if running?
        if force == true
          stop
        else
          raise ContainerError, "Container is running. Stop it first or use force=true"
        end  
      end

      run("destroy")

      !exists?
    end
59594
protected function perform_delete( $force ) {
		switch ( $this->wp_type ) {
			case 'term':
				$delete = wp_delete_term( $this->get_id(), $this->object_type );
				return ( ! is_wp_error( $delete ) && true === $delete );

			case 'post':
				if ( ! $force && 'trash' !== get_post_status( $this->get_id() ) && EMPTY_TRASH_DAYS ) {
					$delete = wp_trash_post( $this->get_id() );
				} else {
					$delete = wp_delete_post( $this->get_id(), true );
				}

				return ( ! is_null( $delete ) && ! is_wp_error( $delete ) && false !== $delete );
		}

		return false;
	}
949139
def delete(self, force=False, volumes=False):
        
        try:
            self.image.rmi()
        except ConuException as ime:
            if not force:
                raise ime
            else:
                pass
1099769
def _delete(self, *args, **kwargs):
        
        response = requests.delete(*args, **kwargs)
        response.raise_for_status()
334343
def delete(self):
        
        resp = self._client.delete(type(self).api_endpoint, model=self)

        if 'error' in resp:
            return False
        self.invalidate()
        return True
328295
def clean(self, force: bool=False):
        '''
        '''
        with (yield from self._lock):
            for connection in tuple(self.ready):
                if force or connection.closed():
                    connection.close()
                    self.ready.remove(connection)
938183
def delete_asset(self):
        
        headers, data = self._requester.requestJsonAndCheck(
            "DELETE",
            self.url
        )
        return True
841640
def delete(cls, **kwargs):
        '''
        
        '''
        q = cls._get_instance(**kwargs)
        if q:
            _action_and_commit(q, session.delete)
320555
public void delete(boolean forceDelete) throws APIException {
        HttpResponse response = client.delete(getUrl() + "?force=" + forceDelete);
        HttpClientHelpers.throwIfNotOk(response);
    }
621327
def deleteable(self, request):
        '''
        
        '''
        return self.apply_deleteable(self.get_queryset(), request) if self.check_deleteable(self.model, request) is not False else self.get_queryset().none()
187705
def delete_pid(self, force_del=False):
        
        pid = self.read_pid()
        if pid != getpid() or force_del:
            logger.debug('process %d tried to delete pid' % getpid())
            return False

        if access(self.pid_file_name, F_OK):
            try:
                remove(self.pid_file_name)  # remove the old pid file
                logger.debug('delete pid (%d)' % getpid())
            except:
                logger.debug("can't delete pid file")
446756
def delete(self, *args, **kwargs):
        
        count = 0
        max_retries=3
        while True:
            try:
                return super(BaseModel, self).delete(*args, **kwargs)
            except django.db.utils.OperationalError:
                if count >= max_retries:
                    raise
                count += 1