For AI agents: The documentation index is at 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).
Deleting an app permanently and irreversibly destroys the app and its components. If you need to re-deploy the app, you can download the app specification file before deleting the app and use the saved spec to build the app again.
Destroy an App Using Automation
The destroy app CLI command and API endpoint require the app’s ID. You can retrieve a list of your apps and their IDs using the doctl apps list command or the /v2/apps endpoint endpoint.
How to Destroy an App Using the DigitalOcean CLI
- Install
doctl, the official DigitalOcean CLI.
- Create a personal access token and save it for use with
doctl.
- Use the token to grant
doctl access to your DigitalOcean account.
- Finally, run
doctl apps delete. Basic usage looks like this, but you can read the usage docs for more details:
doctl apps delete <app id> [flags]
The following example deletes an app with the ID f81d4fae-7dec-11d0-a765-00a0c91e6bf6:
doctl apps delete f81d4fae-7dec-11d0-a765-00a0c91e6bf6
How to Destroy an App Using the DigitalOcean API
Create a personal access token and save it for use with the API.
cURL
Send a DELETE request to https://api.digitalocean.com/v2/apps/{id}.
Using cURL:
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/apps/{id}"
Python
Using PyDo, the official DigitalOcean API client for Python:
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
delete_resp = client.apps.delete(id="b7d64052")
Destroy an App Using the Control Panel
To destroy an app, go to the Apps page, select the app you want to destroy, then click the Settings tab.
At the bottom of the page, click Destroy. Enter the app’s name to confirm, then click Destroy.