{
    "mode": "man",
    "parameter": "GPGV",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/GPGV/1/json",
    "generated": "2026-10-22T13:17:56Z",
    "synopsis": "gpgv [options] signedfiles",
    "sections": {
        "NAME": {
            "content": "gpgv - Verify OpenPGP signatures\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "gpgv [options] signedfiles\n\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "gpgv is an OpenPGP signature verification tool.\n\nThis  program  is  actually a stripped-down version of gpg which is only able to check signa‐\ntures. It is somewhat smaller than the fully-blown gpg and uses a different (and simpler) way\nto check that the public keys used to make the signature are valid. There are  no  configura‐\ntion files and only a few options are implemented.\n\ngpgv  assumes that all keys in the keyring are trustworthy.  That does also mean that it does\nnot check for expired or revoked keys.\n\nIf no --keyring option is given, gpgv looks for a ``default'' keyring named ‘trustedkeys.kbx’\n(preferred) or ‘trustedkeys.gpg’ in the home directory of GnuPG, either the default home  di‐\nrectory or the one set by the --homedir option or the GNUPGHOME environment variable.  If any\n--keyring  option  is  used, gpgv will not look for the default keyring. The --keyring option\nmay be used multiple times and all specified keyrings will be used together.\n\n\n",
            "subsections": []
        },
        "RETURN VALUE": {
            "content": "The program returns 0 if everything is fine, 1 if at least one signature was bad,  and  other\nerror codes for fatal errors.\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "gpgv recognizes these options:\n\n\n",
            "subsections": [
                {
                    "name": "--verbose",
                    "content": "",
                    "long": "--verbose"
                },
                {
                    "name": "-v",
                    "content": "detail.\n\n",
                    "flag": "-v"
                },
                {
                    "name": "--quiet",
                    "content": "",
                    "long": "--quiet"
                },
                {
                    "name": "-q",
                    "content": "--keyring file\nAdd file to the list of keyrings.  If file begins with a tilde and a slash, these  are\nreplaced  by  the  HOME directory. If the filename does not contain a slash, it is as‐\nsumed to be in the home-directory (\"~/.gnupg\" if --homedir is not used).\n\n\n--output file",
                    "flag": "-q"
                },
                {
                    "name": "-o _",
                    "content": "Write output to file; to write to stdout use -.  This option can be used  to  get  the\nsigned  text  from  a cleartext or binary signature; it also works for detached signa‐\ntures, but in that case this option is in general not useful.  Note that  an  existing\nfile will be overwritten.\n\n\n\n--status-fd n\nWrite  special  status  strings to the file descriptor n.  See the file DETAILS in the\ndocumentation for a listing of them.\n\n",
                    "flag": "-o"
                },
                {
                    "name": "--logger-fd n",
                    "content": "Write log output to file descriptor n and not to stderr.\n\n",
                    "long": "--logger-fd"
                },
                {
                    "name": "--log-file file",
                    "content": "Same as --logger-fd, except the logger data is written to file file.  Use  ‘socket://’\nto log to socket.\n\n",
                    "long": "--log-file"
                },
                {
                    "name": "--ignore-time-conflict",
                    "content": "GnuPG  normally  checks  that  the timestamps associated with keys and signatures have\nplausible values. However, sometimes a signature seems to be older than the key due to\nclock problems. This option turns these checks into warnings.\n\n\n--homedir dir\nSet the name of the home directory to dir. If this option is not used, the home direc‐\ntory defaults to ‘~/.gnupg’.  It is only recognized when given on  the  command  line.\nIt  also  overrides  any  home  directory  stated  through  the  environment  variable\n‘GNUPGHOME’ or (on  Windows  systems)  by  means  of  the  Registry  entry  HKCU\\Soft‐\nware\\GNU\\GnuPG:HomeDir.\n\nOn Windows systems it is possible to install GnuPG as a portable application.  In this\ncase  only this command line option is considered, all other ways to set a home direc‐\ntory are ignored.\n\n",
                    "long": "--ignore-time-conflict"
                },
                {
                    "name": "--weak-digest name",
                    "content": "Treat the specified digest algorithm as weak.  Signatures made over weak digests algo‐\nrithms are normally rejected. This option can be supplied multiple times  if  multiple\nalgorithms  should  be  considered  weak.  MD5 is always considered weak, and does not\nneed to be listed explicitly.\n\n",
                    "long": "--weak-digest"
                },
                {
                    "name": "--enable-special-filenames",
                    "content": "This option enables a mode in which filenames of the form ‘-&n’, where n is a non-neg‐\native decimal number, refer to the file descriptor n and not to a file with that name.\n\n\n--assert-pubkey-algo algolist\nThis option works in the same way as described for gpg.\n\n",
                    "long": "--enable-special-filenames"
                }
            ]
        },
        "EXAMPLES": {
            "content": "",
            "subsections": [
                {
                    "name": "gpgv pgpfile",
                    "content": "gpgv sigfile [datafile]\nVerify the signature of the file. The second form is  used  for  detached  signatures,\nwhere  sigfile is the detached signature (either ASCII-armored or binary) and datafile\ncontains the signed data; if datafile is \"-\" the signed data is expected on stdin;  if\ndatafile  is  not given the name of the file holding the signed data is constructed by\ncutting off the extension (\".asc\", \".sig\" or \".sign\") from sigfile.\n\n"
                }
            ]
        },
        "FILES": {
            "content": "",
            "subsections": [
                {
                    "name": "~/.gnupg/trustedkeys.gpg",
                    "content": "The default keyring with the allowed keys.\n\n"
                }
            ]
        },
        "ENVIRONMENT": {
            "content": "HOME   Used to locate the default home directory.\n\n\nGNUPGHOME\nIf set directory used instead of \"~/.gnupg\".\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "gpg(1)\n\nThe full documentation for this tool is maintained as a Texinfo manual.   If  GnuPG  and  the\ninfo program are properly installed at your site, the command\n\ninfo gnupg\n\nshould give you access to the complete manual including a menu structure and an index.\n\n\n\n\nGnuPG 2.4.4                                  2024-01-25                                      GPGV(1)",
            "subsections": []
        }
    },
    "summary": "gpgv - Verify OpenPGP signatures",
    "flags": [
        {
            "flag": "",
            "long": "--verbose",
            "arg": null,
            "description": ""
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": "detail."
        },
        {
            "flag": "",
            "long": "--quiet",
            "arg": null,
            "description": ""
        },
        {
            "flag": "-q",
            "long": null,
            "arg": null,
            "description": "--keyring file Add file to the list of keyrings. If file begins with a tilde and a slash, these are replaced by the HOME directory. If the filename does not contain a slash, it is as‐ sumed to be in the home-directory (\"~/.gnupg\" if --homedir is not used). --output file"
        },
        {
            "flag": "-o",
            "long": null,
            "arg": null,
            "description": "Write output to file; to write to stdout use -. This option can be used to get the signed text from a cleartext or binary signature; it also works for detached signa‐ tures, but in that case this option is in general not useful. Note that an existing file will be overwritten. --status-fd n Write special status strings to the file descriptor n. See the file DETAILS in the documentation for a listing of them."
        },
        {
            "flag": "",
            "long": "--logger-fd",
            "arg": null,
            "description": "Write log output to file descriptor n and not to stderr."
        },
        {
            "flag": "",
            "long": "--log-file",
            "arg": null,
            "description": "Same as --logger-fd, except the logger data is written to file file. Use ‘socket://’ to log to socket."
        },
        {
            "flag": "",
            "long": "--ignore-time-conflict",
            "arg": null,
            "description": "GnuPG normally checks that the timestamps associated with keys and signatures have plausible values. However, sometimes a signature seems to be older than the key due to clock problems. This option turns these checks into warnings. --homedir dir Set the name of the home directory to dir. If this option is not used, the home direc‐ tory defaults to ‘~/.gnupg’. It is only recognized when given on the command line. It also overrides any home directory stated through the environment variable ‘GNUPGHOME’ or (on Windows systems) by means of the Registry entry HKCU\\Soft‐ ware\\GNU\\GnuPG:HomeDir. On Windows systems it is possible to install GnuPG as a portable application. In this case only this command line option is considered, all other ways to set a home direc‐ tory are ignored."
        },
        {
            "flag": "",
            "long": "--weak-digest",
            "arg": null,
            "description": "Treat the specified digest algorithm as weak. Signatures made over weak digests algo‐ rithms are normally rejected. This option can be supplied multiple times if multiple algorithms should be considered weak. MD5 is always considered weak, and does not need to be listed explicitly."
        },
        {
            "flag": "",
            "long": "--enable-special-filenames",
            "arg": null,
            "description": "This option enables a mode in which filenames of the form ‘-&n’, where n is a non-neg‐ ative decimal number, refer to the file descriptor n and not to a file with that name. --assert-pubkey-algo algolist This option works in the same way as described for gpg."
        }
    ],
    "examples": [
        "gpgv sigfile [datafile]",
        "Verify the signature of the file. The second form is  used  for  detached  signatures,",
        "where  sigfile is the detached signature (either ASCII-armored or binary) and datafile",
        "contains the signed data; if datafile is \"-\" the signed data is expected on stdin;  if",
        "datafile  is  not given the name of the file holding the signed data is constructed by",
        "cutting off the extension (\".asc\", \".sig\" or \".sign\") from sigfile."
    ],
    "see_also": [
        {
            "name": "gpg",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/gpg/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Verify OpenPGP signatures.",
        "examples": [
            {
                "description": "Verify a clearsigned or inline-signed file (the signature is embedded in the file itself)",
                "command": "gpgv {{path/to/file.asc}}"
            },
            {
                "description": "Verify a detached signature (`.asc` or `.sig`) against its corresponding data file",
                "command": "gpgv {{path/to/signature.asc}} {{path/to/data_file}}"
            },
            {
                "description": "Verify a detached signature using a specific public keyring or exported public key file (`.gpg` or `.kbx`)",
                "command": "gpgv --keyring {{path/to/pubkey_or_keyring.gpg}} {{path/to/signature.asc}} {{path/to/data_file}}"
            },
            {
                "description": "Verify a detached signature using a specific public key file in plain text format (`.txt`)",
                "command": "gpg --dearmor {{-o|--output}} {{path/to/pubkey.gpg}} {{path/to/pubkey.txt}} && gpgv --keyring {{path/to/pubkey.gpg}} {{path/to/signature.asc}} {{path/to/data_file}}"
            }
        ]
    }
}