Restart gpg? --kill is invalid

How do I restart gpg without rebooting my server?

gpgconf --kill gpg-agent does not work. I receive the error “gpgconf: invalid option “–kill””.

Looking in Windows Services, I can’t see a service specifically named gpconf or gpg or anything along those lines.

Suggestions?

I am killing gpg subsystem by batch:

@echo off
pskill kleopatra.exe
pskill gpg.exe
pskill gpgsm.exe
pskill gpg-agent.exe
pskill dirmngr.exe
pskill scdaemon

pause

pskill is part of MS sysinternals tools:
https://docs.microsoft.com/en-us/sysinternals/downloads/pskill

If you need to use pskill on Windows, you can use the native built-in taskkill. Its in W10 and I believe its been there since W7.

Note that you usually do not need to kill gpg.exe and gpgsm.exe, as both are not daemons (long running processes). If you kill them, you may interrupt an action.

You may need to do it only if they hang.

Gpgconf is somewhere on windows, maybe you need to specify the path completely, (in this very moment I cannot check).

If you want to restart something a single time, you could use the taskmanager and the the right click menu or just reboot the machine. (Again there is no gpg or gpgsm process unless they are actively working on a command, long running are the gpg-agent, dirmngr, kleopatra and scdaemin. You can stop kleopatra from its menu.)