> ## 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.

# aptible endpoints:deprovision

This command deprovisions an [App Endpoint](https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/overview.md) or a [Database Endpoint](https://www.aptible.com/docs/core-concepts/managed-databases/connecting-databases/database-endpoints.md).

# Synopsis

```
Usage:
  aptible endpoints:deprovision HOSTNAME [flags]

Flags:
      --app string           App handle
      --database string      Database handle
  -e, --env string           Environment handle (alias)
      --environment string   Environment handle
```

# Examples

The examples below `$ENDPOINT_HOSTNAME` reference the [Endpoint Hostname](https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/custom-domain.md#endpoint-hostname) for the Endpoint you'd like to deprovision.

> [!NOTE]
>
> Use the [`aptible endpoints:list`](https://www.aptible.com/docs/reference/aptible-cli/cli-commands/cli-endpoints-list) command to easily locate the [Endpoint Hostname](https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/custom-domain.md#endpoint-hostname) for a given Endpoint.

#### Deprovision an App Endpoint

```shell theme={null}
aptible endpoints:deprovision \
        --app "$APP_HANDLE" \
        "$ENDPOINT_HOSTNAME"
```

#### Deprovision a Database Endpoint

```shell theme={null}
aptible endpoints:deprovision \
        --database "$DATABASE_HANDLE" \
        "$ENDPOINT_HOSTNAME"
```
