void tryRemoveAllUnexpectedDirs() {
    logger.info("Removing unexpected directories: {}", unexpectedDirs);
    for (String unexpectedDir : unexpectedDirs) {
      String[] segments = unexpectedDir.split(File.separator);
      if (segments.length > 1) {
        String partitionName = segments[segments.length - 1];
        try {
          File dirToDelete = new File(unexpectedDir);
          Utils.deleteFileOrDirectory(dirToDelete);
          logger.info("Removed directory {}", unexpectedDir);
          diskSpaceAllocator.deleteAllSegmentsForStoreIds(Collections.singletonList(partitionName));
        } catch (Exception e) {
          logger.error("Failed to delete directory for partition {}", partitionName, e);
        }
      }
    }
  }
Try to remove all unexpected directories.
ambry-store/src/main/java/com/github/ambry/store/DiskManager.java