Given
A public key with multiple signatures on both the uid and subkey(s).
$ gpg --list-sigs --with-colon some-key-id tru:YYY:5 pub:-:4096:YYY:0: fpr:::::::::XXX: uid:YYY:0: sig:YYY:2: sig:YYY:10: sub:-:4096:YYY:23: fpr:::::::::XXX: sig:YYY:2: sig:YYY:10:
Action
$ gpg --edit-key some-key-id clean save quit
Expectation
According to @dkg all superseded key signatures, on both the user id and subkeys should be removed.
Or as man gpg says
clean ... Compact (by removing all signatures except the selfsig) any user ID that is no longer usable (e.g. revoked, or expired). Then, remove any signatures that are not usable by the trust calculations. Specifically, this removes any signature that does not validate, any signature that is superseded by a later signature, revoked signatures, and signatures issued by keys that are not present on the keyring.
Result
The superseded duplicate signature on the subkey is not removed:
$ gpg --list-sigs --with-colon some-key-id tru:YYY:5 pub:-:4096:YYY:0: fpr:::::::::XXX: uid:YYY:0: sig:YYY:10: sub:-:4096:YYY:23: fpr:::::::::XXX: sig:YYY:2: # <--- should have been removed !! sig:YYY:10: