public void cleanupSnapshot(String snapshotId) throws ConsensusGroupModifyPeerException {
    File snapshotDir = new File(storageDir, snapshotId);
    if (snapshotDir.exists()) {
      try {
        FileUtils.deleteDirectory(snapshotDir);
      } catch (IOException e) {
        throw new ConsensusGroupModifyPeerException(e);
      }
    } else {
      logger.info("File not exist: {}", snapshotDir);
    }
  }
In the case of multiple copies, the minimum synchronization index is selected. In the case of
single copies, the current index is selected
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensusServerImpl.java