destroy session by session id:
762617
function (sid, callback) {
        mongooseModel.findOneAndRemove(_applyProp(propSid, sid), function(err) {
          (callback||_.noop)(err);
        });
      }
860112
public function destroy()
	{
		// do we have something to destroy?
		if ( ! empty($this->keys))
		{
			// delete the key from the redis server
			$this->redis->del($this->keys['session_id']);
		}

		parent::destroy();

		return $this;
	}
689825
static function destroy(){
		if( ! self::started() ){
			trigger_error( "Session not started", E_USER_WARNING );
			return;
		}
		if( session_id() !== self::$Session->id ){
			trigger_error( "Wrong session id", E_USER_WARNING );
			return;
		}
		// start new session trashing the old one
		if( ! headers_sent( $file, $line ) ){
			session_regenerate_id( true );
			new PLUGSession();
		}
		// unless it's too late to send a new cookie
		else {			
			session_destroy();
			unset( $_SESSION['PLUGSession'] );
		}
	}
625592
def close_session():
        
        for prop in LTI_PROPERTY_LIST:
            if session.get(prop, None):
                del session[prop]
        session[LTI_SESSION_KEY] = False
964507
def action_delete(self, ids):
        """"""
        is_current = any(SessionActivity.is_current(sid_s=id_) for id_ in ids)
        if is_current:
            flash('You could not remove your current session', 'error')
            return
        for id_ in ids:
            delete_session(sid_s=id_)
        db.session.commit()
394010
public function destroy()
    {
        session_start();

        if(ini_get("session.use_cookies"))
        {
            $params = session_get_cookie_params();
            setcookie(session_name(),
                      '',
                      time() - 42000,
                      $params["path"],
                      $params["domain"],
                      $params["secure"],
                      $params["httponly"]
            );
        }

        session_unset();
        session_regenerate_id(true);
        session_destroy();
        session_write_close();
    }
1329883
def destroy(cls, *ids):
        
        for pk in ids:
            cls.find(pk).delete()
        cls.session.flush()
846159
async def sessiondestroy(self):
        
        if hasattr(self, 'session') and self.session:
            setcookies = await call_api(self.container, 'session', 'destroy', {'sessionid':self.session.id})
            self.session.unlock()
            del self.session
            for nc in setcookies:
                self.sent_cookies = [c for c in self.sent_cookies if c.key != nc.key]
                self.sent_cookies.append(nc)
52369
public function destroy($session_id)
    {
        if (is_null($this->handlers)) {
            $this->seedHandlerStack();
        }

        /** @var callable $start */
        $start = $this->stacks['delete']->top();
        $this->handlerLock = true;
        $data = $start($session_id);
        $this->handlerLock = false;
        return $data;
    }
574842
def destroy(self, sshkeyid, params=None):
        ''' 
        '''
        params = update_params(params, {'SSHKEYID': sshkeyid})
        return self.request('/v1/sshkey/destroy', params, 'POST')
320662
function destroy($session_id) {

        // delete the current session id from the database
        $this->_mysql_query('

            DELETE FROM
                ' . $this->table_name . '
            WHERE
                session_id = "' . $this->_mysql_real_escape_string($session_id) . '"

        ');

        // return true if everything went well
        return ($this->_mysql_affected_rows() !== -1);

    }
1362814
def close(self) -> None:
        """"""
        if self.session_id is not None:
            self.client.delete_session(self.session_id)
        self.client.close()
211904
def delete(self, id: int):
        
        assert isinstance(id, int)

        self.open_session()
        to_delete = self.get(id)
        self.session.delete(to_delete)
        self.save()
1064465
def destroy(self, scriptid, params=None):
        ''' 
        '''
        params = update_params(params, {'SCRIPTID': scriptid})
        return self.request('/v1/startupscript/destroy', params, 'POST')
1164730
def strip_path_session_id(path):
    ''''''
    for pattern in SESSION_ID_PATH_PATTERNS:
        match = pattern.match(path)
        if match:
            path = match.group(1) + match.group(3)

    return path
920246
public function destroy()
    {
        $this->security->destroy();
        $_SESSION = [];
        setcookie(session_name(), '', 1);
        unset($_COOKIE[session_name()]);
        session_destroy();
    }
589234
public function destroy($sessionId): bool
    {
        $sql = 'DELETE FROM sessions WHERE id = :id';
        $params = ['id' => $sessionId];
        $this->db->delete($sql, $params);

        return true;
    }