in src/main/java/org/apache/sling/sitemap/impl/SitemapStorage.java [215:226]
public void deleteState(@NotNull Resource sitemapRoot, @NotNull String name) throws IOException {
String statePath = getSitemapFilePath(sitemapRoot, name) + STATE_EXTENSION;
try (ResourceResolver resolver = resourceResolverFactory.getServiceResourceResolver(AUTH)) {
Resource stateResource = resolver.getResource(statePath);
if (stateResource != null) {
resolver.delete(stateResource);
resolver.commit();
}
} catch (LoginException | PersistenceException ex) {
throw new IOException("Cannot create state at " + statePath, ex);
}
}