@Transactional
  public void removeByStack(StackId stackId) {
    List<RepositoryVersionEntity> repoVersionDeleteCandidates = findByStack(stackId);
    for(RepositoryVersionEntity repositoryVersionEntity : repoVersionDeleteCandidates) {
      entityManagerProvider.get().remove(repositoryVersionEntity);
    }
  }
Removes the specified repoversion entry based on stackid.

@param stackId
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RepositoryVersionDAO.java