private boolean deleteReferenceInSystemKeyspace(Keyspace keyspace){ try (EmbeddedGraknTx<?> tx = systemKeyspaceSession.transaction(GraknTxType.WRITE)) { AttributeType<String> keyspaceName = tx.getSchemaConcept(KEYSPACE_RESOURCE); Attribute<String> attribute = keyspaceName.attribute(keyspace.getValue()); if(attribute == null) return false; Thing thing = attribute.owner(); if(thing != null) thing.delete(); attribute.delete(); existingKeyspaces.remove(keyspace); tx.commit(); } return true; }