The previous GPG UID name was Scvoet, which is my username. Some time ago, I changed the nickname of each platform to my English name Percy, and today I changed the UID name of GPG to my English name as well.

The information returned by the command has been trimmed down to remove most of the unnecessary confirmation and key list display.

Open the command line tool and enter the email address associated with the UID.

1
> gpg --edit-key scvoet@gmail.com
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
gpg (GnuPG) 2.2.23; Copyright (C) 2020 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Secret key is available.

sec  rsa3072/B42805AC703F532A
     created: 2021-02-25  expires: 2023-02-25  usage: SC
     trust: ultimate      validity: ultimate
ssb  rsa3072/8EA8D7910D16C163
     created: 2021-02-25  expires: 2023-02-25  usage: E
[ultimate] (1). Scvoet <scvoet@gmail.com>

First add a new UID

1
gpg> adduid

In the middle, you will be asked to fill in the information about UID in order, just enter the new name and keep the other information with the old UID.

1
2
3
4
5
Real name: Percy
Email address: scvoet@gmail.com
Comment:
You selected this USER-ID:
    "Percy <scvoet@gmail.com>"

Confirm the information after completion, and you will be asked to enter the password sentence (passphrase) corresponding to the certificate after confirmation.

1
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? 

A new UID has appeared.

1
2
3
4
5
6
7
sec  rsa3072/B42805AC703F532A
     created: 2021-02-25  expires: 2023-02-25  usage: SC
     trust: ultimate      validity: ultimate
ssb  rsa3072/8EA8D7910D16C163
     created: 2021-02-25  expires: 2023-02-25  usage: E
[ultimate] (1). Scvoet <scvoet@gmail.com>
[ unknown] (2)* Percy <scvoet@gmail.com>

First raise the trust level of the new UID, because it is already selected after it is generated, so we do not need to select it first, just do it directly.

1
gpg> trust
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
Please decide how far you trust this user to correctly verify other users' keys
(by looking at passports, checking fingerprints from different sources, etc.)

  1 = I don't know or won't say
  2 = I do NOT trust
  3 = I trust marginally
  4 = I trust fully
  5 = I trust ultimately
  m = back to the main menu

Your decision?

In general, just select 5 Full Trust and there will be a confirmation session later.

Now check the old UID.

1
gpg> uid 1

The * symbol will appear next to the number when it is selected.

1
2
3
4
5
6
7
sec  rsa3072/B42805AC703F532A
     created: 2021-02-25  expires: 2023-02-25  usage: SC
     trust: ultimate      validity: ultimate
ssb  rsa3072/8EA8D7910D16C163
     created: 2021-02-25  expires: 2023-02-25  usage: E
[ultimate] (1) Scvoet <scvoet@gmail.com>
[ unknown] (2)* Percy <scvoet@gmail.com>

Remove it, there is still a confirmation link.

1
gpg> deluid

Finally, save the name change and you are done.

1
gpg> save