> ## Documentation Index
> Fetch the complete documentation index at: https://www.aptible.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How to deprovision resources

First, review the [resource-specific restoration options](https://www.aptible.com/docs/how-to-guides/platform-guides/restore-resources.md) to understand the impact of deprovisioning each type of resource and make any necessary preparations, such as exporting Database data, before proceeding.

## Apps

Deprovisioning an App also deprovisions its [Endpoints](https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/overview.md). [Apps](https://www.aptible.com/docs/core-concepts/apps/overview.md) can be deprovisioned using the [`aptible apps:deprovision`](https://www.aptible.com/docs/reference/aptible-cli/cli-commands/cli-apps-deprovision) CLI command or through the Dashboard:

* Select the App

* Select the **Deprovision** tab

* Follow the prompt

## Database Backups

Automated [Backups](https://www.aptible.com/docs/core-concepts/managed-databases/managing-databases/database-backups.md) are deleted per the Environment's [backup retention policy](https://www.aptible.com/docs/core-concepts/managed-databases/managing-databases/database-backups.md#retention-and-disposal) when the Database is deprovisioned. Manual backups, created using the [`aptible db:backup`](https://www.aptible.com/docs/reference/aptible-cli/cli-commands/cli-db-backup) CLI command, must be deleted using the [`aptible backup:purge`](https://www.aptible.com/docs/reference/aptible-cli/cli-commands/cli-backup-purge) CLI command or through the Dashboard:

* Select the **Backup Management** tab within the desired Environment.

* Select "**Permanently remove this backup**" for backups marked as Manual.

## Databases

[Databases](https://www.aptible.com/docs/core-concepts/managed-databases/managing-databases/overview.md) can be deprovisioned using the [`aptible db:deprovision`](https://www.aptible.com/docs/reference/aptible-cli/cli-commands/cli-db-deprovision) CLI command or through the Dashboard:

* Select the desired Database.

* Select the **Deprovision** tab.

* Follow the prompt.

## Log and Metric Drains

Delete Log and Metric Drains in the Dashboard:

* Select the Log Drains or Metric Drains tabs within each Environment.

* Select **Delete** on the top right of each drain.

## Environments

[Environments](https://www.aptible.com/docs/core-concepts/architecture/environments.md) can only be deprovisioned after all of the resources in the Environment have been deprovisioned. Environments can only be deprovisioned through the Dashboard:

* Select the **Deprovision** tab within the Environment.

* Follow the prompt.
