code: @Override
      public void deleteTemporary() throws DatabaseException {
          try {
              for (Integer type : HistoryReference.getTemporaryTypes()) {
                  while (true) {
                      psDeleteTemp.setInt(1, type);
                      int result = psDeleteTemp.executeUpdate();
                      if (result == 0) {
                          break;
                      }
                  }
              }
  		} catch (SQLException e) {
  			throw new DatabaseException(e);
  		}
      }
docs: Deletes all records whose history type was marked as temporary (by calling {@code setHistoryTypeTemporary(int)}).
  <p>
  By default the only temporary history types are {@code HistoryReference#TYPE_TEMPORARY} and
  {@code HistoryReference#TYPE_SCANNER_TEMPORARY}.
  </p>
  
  @throws DatabaseException if an error occurred while deleting the temporary history records
  @see HistoryReference#getTemporaryTypes()