GH-SECRET-DELETE(1) GitHub CLI manual GH-SECRET-DELETE(1)

# [NAME](#NAME)

gh-secret-delete - Delete secrets

# [SYNOPSIS](#SYNOPSIS)

**gh secret delete &lt;secret-name&gt; \[flags]**

# [DESCRIPTION](#DESCRIPTION)

Delete a secret on one of the following levels: - repository (default): available to GitHub Actions runs, Agents sessions, or Dependabot in a repository - environment: available to GitHub Actions runs for a deployment environment in a repository - organization: available to GitHub Actions runs, Agents sessions, Dependabot, or Codespaces within an organization - user: available to Codespaces for your user

# [OPTIONS](#OPTIONS)

[**-a**, **--app** **&lt;string&gt;**](#a)

Delete a secret for a specific application: {actions|agents|codespaces|dependabot}

[**-e**, **--env** **&lt;string&gt;**](#e)

Delete a secret for an environment

[**-o**, **--org** **&lt;string&gt;**](#o)

Delete a secret for an organization

[**-u**, **--user**](#u)

Delete a secret for your user

# [OPTIONS INHERITED FROM PARENT COMMANDS](#OPTIONS_INHERITED_FROM_PARENT_COMMANDS)

[**-R**, **--repo** **&lt;\[HOST/\]OWNER/REPO&gt;**](#R)

Select another repository using the \[HOST/]OWNER/REPO format

# [ALIASES](#ALIASES)

gh secret remove

# [EXIT CODES](#EXIT_CODES)

0: Successful execution

1: Error

2: Command canceled

4: Authentication required

NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.

# [SEE ALSO](#SEE_ALSO)

[**gh-secret(1)**](/man/os/gh/gh-secret.1)

Oct 2026

---

Document: gh-secret-delete(1) from gh 2.103.2-r0 (Chainguard OS)
Source: https://github.com/cli/cli
