Backport PR #5516: ENH: list generated config files in generated, and rm them upon clean

If accepted -- please pick it also into 2.x branch

Cheers!