Delete a secret

Delete a secret with every version, grant and access log entry, one at a time or many at once.

Last updated 18 November 2026View as Markdown

Warning

Every version is deleted and cannot be recovered. An app variable bound to the secret is left without a value: from the next rollout the app runs without that variable. A workflow job that names it fails at its next run (in GitHub Actions syntax it gets an empty value), unless the Default secret of that name remains to take its place.

Replace 5b8c1d2e-3f4a-4b6c-8d7e-9f0a1b2c3d4e with the secret's id.

Prerequisites

  • Permission for secrets:DeleteSecret on the secret. In the console, also secrets:ListSecrets to open Secrets; without it the page says "You do not have permission to list secrets."
  • Not a source's credential: disconnect the source instead (see Manage a source).
  • For a secret managed by Error Tracking: no app or CI environment uses it any more.

Delete one secret

  1. Open Secrets and choose the secret.
  2. In its panel, under Danger zone, choose Delete secret.
  3. Enter the secret's name, then choose Delete secret.

The answer is 200 with the deleted secret's id. Only this environment's secret of the name is deleted.

Delete many secrets

  1. Open Secrets and select the secrets' check boxes.
  2. Choose Delete.
  3. Enter the confirmation the dialog asks for (delete 3 secrets for three), then choose Delete.

At most 500 ids per call. Each is answered on its own in { results, succeeded, failed }; the call is not atomic.

Refusals

  • 409 "This is the credential of the secret source "name". Disconnect the source instead". In a bulk delete, that item fails with "The credential of the source "name". Disconnect the source instead".
  • 409 for a secret managed by Error Tracking that an app or CI environment still uses, naming where to disconnect it.
  • 403 without secrets:DeleteSecret.
Did this page help you?