private void deleteFromDisk(final IndexShard shard) {
        try {
            // Find the index shard dir.
            final Path dir = IndexShardUtil.getIndexPath(shard, pathCreator);
            LOGGER.debug(() -> LogUtil.message("deleteFromDisk() - shard ID: {}, dir: '{}'",
                    shard.getId(), LogUtil.path(dir)));

            // See if there are any files in the directory.
            if (!Files.isDirectory(dir) || FileUtil.deleteDir(dir)) {
                // The directory either doesn't exist or we have
                // successfully deleted it so delete this index
                // shard from the database.
                if (indexShardDao != null) {
                    indexShardDao.delete(shard.getId());
                }
            }
        } catch (final RuntimeException e) {
            LOGGER.error(e::getMessage, e);
        }
    }
Delete anything that has been marked to delete
stroom-index/stroom-index-impl/src/main/java/stroom/index/impl/IndexShardManager.java