private List<String> sortedUnusedFileReferences(File fileReferencesPath, Set<String> fileReferencesInUse) {
        Set<String> fileReferencesOnDisk = getFileReferencesOnDisk(fileReferencesPath);
        log.log(Level.FINEST, () -> "File references on disk (in " + fileReferencesPath + "): " + fileReferencesOnDisk);
        return fileReferencesOnDisk
                .stream()
                .filter(fileReference -> ! fileReferencesInUse.contains(fileReference))
                .sorted(Comparator.comparing(a -> lastModified(new File(fileReferencesPath, a))))
                // Do max 20 at a time
                .limit(20)
                .toList();
    }
Deletes an application and associated resources

@return true if the application was found and deleted, false if it was not present
@throws RuntimeException if deleting the application fails. This method is exception safe.
configserver/src/main/java/com/yahoo/vespa/config/server/ApplicationRepository.java