private void deleteFileIfExists(File file) {
        try {
            Files.deleteIfExists(file.toPath());
        } catch (IOException e) {
            throw new UncheckedIOException(
                String.format("Error while deleting file %s", file.getAbsoluteFile()), e);
        }
    }
Clear state store by deleting the local quorum state file
raft/src/main/java/org/apache/kafka/raft/FileQuorumStateStore.java