Many parts of this page are now obsolete, as GnuPG can be installed from Debian experimental with the 2.x packages taking over the gnupg and gpgv program names.

This is a list of packages either supporting GnuPG v2.1 (gnupg2, gpgv2) natively, or describing how to make them use it.

General support

Usage approaches

There are three major approaches when it comes to using GnuPG v2, the first is the preferred one if experimental can be used, the other two have advantages and disadvantages but are pretty much discouraged by the GnuPG Team. If you want to help and speed up a possible transition to GnuPG v2, you can assist by testing applications with one of these methods:


Many programs check for the presence of the gpg-agent by checking the environment variable GPG_AGENT_INFO, to decide if they can proceed at all, or if they need to prompt the user for a passphrase which they then cache. With latest GnuPG this is counterproductive, as it does not use any longer the GPG_AGENT_INFO environment variable (the communication socket uses a stable pathname now), and gpg2 will make sure to start the gpg-agent on demand.

For compatibility with these programs, it is wise to define the variable with a compatible value, as some of these programs even parse its contents. Something like the following should do:

: ${GNUPGHOME=$HOME/.gnupg}

Alternatively, when using the X Window System, you can simply set in ~/.gnupg/gpg.conf:


and the Xsession setup code will take care of starting the agent and setting the environment variable with a correct value.

According to upstream, the correct fix is to invoke gpg-agent --use-standard-socket-p and check that it returns 0, which means that the agent can be used even if GPG_AGENT_INFO is not set. This works with GnuPG 2.0 and 2.1 (even though it's not documented in the info nor man pages for the latter).



Defaults to GnuPG v1. To configure some of the parts to use GnuPG v2, add the following to apt.conf:

Dir::Bin::gpg "gpgv2";

but older versions of apt-key (apt < 1.1~exp4) hardcode the program name (instead of using apt-config). And newer versions (apt >= 1.1~exp4) do not work at all when using:

Apt::Key::gpgcommand "gpg2";

because apt-key still hardcodes an invocation of gpgv which cannot handle the newly generated keyrings by the gpg2 binary. 781042


Defaults to GnuPG v1. Hardcodes the gpgv program name.


Defaults to GnuPG v1. Hardcodes the gpgv program name.


Supports gnupg2/gpgv2 natively since 1.17.2, and will prefer them over gnupg/gpgv if they are installed.


Support GnuPG 2.x natively since 0.15. Can use an alternative program with via the DEBSIG_GNUPG_PROGRAM environment variable since 0.14.


Defaults to GnuPG v1. Hardcodes absolute pathname to the binary.


Defaults to GnuPG v1. Hardcodes the program name.


Defaults to GnuPG v1. Add the following setting to ~/.devscripts.



Defaults to GnuPG v1. Hardcodes the program name.


Defaults to GnuPG v1. Hardcodes the program name. But the *.changes checker is configurable in dupload.conf, by copying /usr/share/dupload/gpg-check to gpg-wrapper and replacing gpg with gpg2:

$preupload{'changes'} = 'gpg-wrapper %s';


Defaults to GnuPG v1. Hardcodes absolute pathname to the binary.


Defaults to GnuPG v1. Run:

git config gpg.program gpg2


Defaults to GnuPG v1. Add the gnupg.vim plugin in .vim/plugins/gnupg.vim, and add to your .vimrc:

let g:GPGExecutable = "gpg2"

The plugin expects the GPG_TTY environment variable to be set, which is a good idea anyway, otherwise it will emit a warning.


Defaults to GnuPG v1. Use /etc/Muttrc.d/gpg.rc as a template, copy it to your home directory (~/.mutt/gpg.rc for example), edit it and replace gpg with gpg2.

Then in your muttrc file add:

set pgp_use_gpg_agent=yes
source "~/.mutt/gpg.rc"

There was a bug (780730) related to pgp_use_gpg_agent and the GPG_AGENT_INFO environment variable that got fixed in 1.5.24-1.


Defaults to GnuPG v1. Can be changed by setting the environment variable GNUPGBIN=gpg2 (requires version >= 1.1.13).


Version >= 1.1.13 supports GnuPG >= 2.1. Otherwise the default can be changed in the ~/.caffrc file:

$CONFIG{'gpg'} = 'gpg2';


With versions < 1.1.13, supports gpg2 natively if available. With >= 1.1.13, it defaults to gpg, but you can use the GNUPGBIN environment variable.