public static void deleteProfiles(File destination, String... profileNames) {
        final Map<String, Profile> modifications = new LinkedHashMap<String, Profile>();
        for (String profileName : profileNames) {
            modifications.put(profileName, null); // null value indicates a deletion
        }

        modifyProfiles(destination, modifications);
    }
public static void deleteProfiles ( File destination , String ... profileNames ) { final Map < String , Profile > modifications = new LinkedHashMap < String , Profile > ( ) ; for ( String profileName : profileNames ) { modifications . put ( profileName , null ) ; } modifyProfiles ( destination , modifications ) ; }
Remove one or more profiles from the existing credentials file by
in-place modification.

@param destination
The destination file to modify
@param profileNames
The names of all the profiles to be deleted.