public void removeApplicationsExcept(Set<ApplicationId> applications) {
        for (ApplicationId activeApplication : applicationMapper.listApplicationIds()) {
            if ( ! applications.contains(activeApplication)) {
                try (@SuppressWarnings("unused") var applicationLock = lock(activeApplication)){
                    removeApplication(activeApplication);
                }
            }
        }
    }
Activates the config of the given app. Notifies listeners

@param applicationVersions the {@link ApplicationVersions} to be activated
configserver/src/main/java/com/yahoo/vespa/config/server/application/TenantApplications.java