code: private static int purgeTree(final TSDB tsdb, final int tree_id, 
        final boolean delete_definition) throws Exception {
      final TreeSync sync = new TreeSync(tsdb, 0, 1, 0);
      return sync.purgeTree(tree_id, delete_definition);
    }
docs: Attempts to delete the branches, leaves, collisions and not-matched entries
  for a given tree. Optionally removes the tree definition itself
  @param tsdb The TSDB to use for access
  @param tree_id ID of the tree to delete
  @param delete_definition Whether or not to delete the tree definition as
  well
  @return 0 if completed successfully, something else if an error occurred