Deleting old environments is the same story, I could create a changes hash and pass it to 'remove_parameter' , but it's an unnecessary complexity. The importer helps in this case to find the new and old environments.

After inspecting the code, possibly new_environments and old_environments could return a hash that could be used in obsolete_and_new and a method like this, but that requires a major refactor of the whole class, that should go in a different PR.