---
updatedAt: 2026-08-05T12:31:19.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/artifactory/llms.txt
---

# Delete Key by Alias

Deletes a GPG/PGP key by its alias.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "JFrog Distribution API",
    "description": "REST API for JFrog Distribution - manages distribution of release bundles to edge nodes. Supports both Release Bundles V1 and V2 workflows including distribution, remote deletion, air-gap export, signing key management, and distribution tracking.",
    "version": "1.0.0",
    "contact": {
      "name": "JFrog Support"
    }
  },
  "servers": [
    {
      "url": "https://{jfrog_url}/distribution/api",
      "description": "JFrog Platform",
      "variables": {
        "jfrog_url": {
          "default": "myserver.jfrog.io",
          "description": "Your JFrog Platform hostname (e.g., mycompany.jfrog.io)"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "GPG Keys",
      "description": "GPG/PGP key management and propagation"
    }
  ],
  "paths": {
    "/v1/keys/pgp/{alias}": {
      "delete": {
        "tags": [
          "GPG Keys"
        ],
        "summary": "Delete Key by Alias",
        "description": "Deletes a GPG/PGP key by its alias.",
        "operationId": "deleteGpgKeyByAlias",
        "parameters": [
          {
            "name": "alias",
            "in": "path",
            "required": true,
            "description": "Key alias to delete",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success - Key deleted"
          },
          "401": {
            "description": "Bad Credentials - The provided authentication is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found - The specified key alias was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          },
          "detail": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "status_code": {
            "type": "integer"
          }
        }
      }
    },
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "BasicAuth": []
    },
    {
      "BearerAuth": []
    }
  ]
}
```