> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify-poc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# remove_continuous_aggregate_policy()

> Remove a refresh policy from a continuous aggregate

export const TIMESCALE_DB = 'TimescaleDB';

export const CAGG = 'continuous aggregate';

<Icon icon="tag" iconType="duotone" /> Since [1.7.0][tsdb-1.7.0]

Remove all refresh policies from a {CAGG}.

```sql theme={"dark"}
remove_continuous_aggregate_policy(
    continuous_aggregate REGCLASS,
    if_exists BOOL = NULL
) RETURNS VOID
```

<Note>
  To view the existing {CAGG} policies, see the [policies informational view][policies].
</Note>

## Samples

Remove all refresh policies from the `cpu_view` {CAGG}:

```sql theme={"dark"}
SELECT remove_continuous_aggregate_policy('cpu_view');
```

## Arguments

The syntax is:

```sql theme={"dark"}
SELECT remove_continuous_aggregate_policy(
    continuous_aggregate = '<view_name>',
    if_exists = true | false
);
```

| Name                                   | Type       | Default | Required | Description                                                                                                 |
| -------------------------------------- | ---------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------- |
| `continuous_aggregate`                 | `REGCLASS` | -       | ✔        | Name of the {CAGG} the policies should be removed from                                                      |
| `if_exists` (formerly `if_not_exists`) | `BOOL`     | false   | -        | When true, prints a warning instead of erroring if the policy doesn't exist. Renamed in {TIMESCALE_DB} 2.8. |

## Returns

This function returns void.

[policies]: /api-reference/timescaledb/informational-views/policies

[tsdb-1.7.0]: https://github.com/timescale/timescaledb/releases/tag/1.7.0
