`locale-gen` invalid usage on debian
https://github.com/canonical/cloud-init/blob/f626daa0faca844927d001f0dd99d00f09d2ecfe/cloudinit/distros/debian.py#L318
This command doesn't take a positional argument on debian. I think it's probably in there because it works on ubuntu where they modified the script but on debian this patch isn't applied therefore this command will not work as intended.
There is also this old issue where someone already found this bug: https://github.com/canonical/cloud-init/issues/4195
On debian you currently have to edit locale.gen before running locale-gen.
See following as reference: https://salsa.debian.org/glibc-team/glibc/-/blob/sid/debian/local/usr_sbin/locale-gen?ref_type=heads
https://git.launchpad.net/ubuntu/+source/glibc/tree/debian/local/usr_sbin/locale-gen?h=ubuntu/noble