You have to perform a rather elaborate cleanup ritual to remove K2 from a SharePoint site before it is deleted. And very few people actually do this, and we end up with a host of "orphaned database entries" in the K2 database.
Not sure if this is possible, but it would be GREAT if K2 can subscribe to event receivers related to the deletion of sites, and site collections (Maybe even web apps) This way, if a SharePoint "artifact" is deleted, K2 will get notified of the deletion, and the entries can be removed from the K2 DB automatically.
Thanks for your feedback, at this time we are not investing in the existing event receivers integration points with SharePoint, and have released new webhooks capabilities with 5.7 for SharePoint Online. Over time, we will migrate SharePoint solutions to this new capability, which does allow for uninstalling the K2 integration with a SharePoint site collection to do a better job cleaning up.