Given a temporary `gpg` home with primary and subordinate keys:
```
$ agent/gpg-agent --daemon --homedir $XDG_RUNTIME_DIR/gnupg-git
$ g10/gpg --homedir $XDG_RUNTIME_DIR/gnupg-git --batch --passphrase '' --quick-gen-key test
$ g10/gpg --homedir $XDG_RUNTIME_DIR/gnupg-git -K --with-subkey-fingerprint
sec rsa3072 2019-04-26 [SC] [expires: 2021-04-25]
783228FA37305EA9110A2D4D8F23802430D3276B
uid [ultimate] test
ssb rsa3072 2019-04-26 [E]
54DAF8C722ECB466481E4E9148BC31B3B885937E
```
Deleting just the secret subkey should leave the primary key intact:
```
$ g10/gpg --homedir $XDG_RUNTIME_DIR/gnupg-git --batch --yes --delete-secret-keys 54DAF8C722ECB466481E4E9148BC31B3B885937E!
$ g10/gpg --homedir $XDG_RUNTIME_DIR/gnupg-git -K
sec rsa3072 2019-04-26 [SC] [expires: 2021-04-25]
783228FA37305EA9110A2D4D8F23802430D3276B
uid [ultimate] test
ssb# rsa3072 2019-04-26 [E]
```