---
title: pydo.security.delete_secret()
description: Delete Secret
product: Reference
url: https://docs.digitalocean.com/reference/pydo/reference/security/delete_secret/
last_updated: "2026-08-03"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# pydo.security.delete_secret()

Generated on 3 Aug 2026 from `pydo` version [`v0.40.0`](https://github.com/digitalocean/pydo/releases/tag/v0.40.0v0.40.0)

## Usage

```python
client.security.delete_secret(secret="my-database-password", region=None)
```

Returns `None`Raises `HttpResponseError`

## Description

To request deletion of a secret, send a DELETE request to [`/v2/security/secrets/{secret}`](https://docs.digitalocean.com/reference/api/reference/security/index.html.md#security_delete_secret).

## Parameters

`secret` string required

The name of the secret.

`region` string optional

The slug identifier for the region where the resource is available.

One of: `ams1`, `ams2`, `ams3`, `blr1`, `fra1`, `lon1`, `nyc1`, `nyc2`, `nyc3`, `sfo1`, `sfo2`, `sfo3`, `sgp1`, `tor1`, `syd1`

## More Information

See [`/v2/security/secrets/{secret}`](https://docs.digitalocean.com/reference/api/reference/security/index.html.md#security_delete_secret) in the API reference for additional detail on responses, headers, parameters, and more.