How do I flush a bad symmetric password from gpg-agent?

Doug Barton dougb at
Tue Aug 18 20:28:26 CEST 2009

Hash: RIPEMD160

I run gpg-agent with the ssh option in my .xsession file so that all
the child processes inherit the environment. This is needed mostly for
the ssh portion of course, since I could update the gpg part of the
agent stuff in .bashrc if I wanted to (although I do not do that now).
This has been working well for me for a long time.

Today I mis-typed a passphrase for a symmetrically encrypted file and
was surprised to discover that gpg-agent had stored the bad passphrase
and would not let me access the file. I have occasionally in the past
mistyped my passphrase for one of my secret keys or an ssh key and
gpg-agent just reprompts for a valid one.

Looking through the man page I don't see any way to flush the bad
password from the agent. Killing and restarting works of course, but
then I'm in bad shape on the ssh side. I could restart my window
manager session, but that sounds like a microsoft solution, not to
mention having to restart apps, etc.

So is this a bug in the agent? Is there a way to flush passwords that
I'm missing? Another solution?


Version: GnuPG v2.0.12 (FreeBSD)


More information about the Gnupg-users mailing list