> ## 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_retention_policy()

> Remove a retention policy from a hypertable

export const HYPERTABLE = 'hypertable';

export const CHUNK = 'chunk';

<Icon icon="circle-play" iconType="duotone" /> Community <Icon icon="tag" iconType="duotone" /> Since [1.2.0][tsdb-1.2.0]

Remove a policy to drop {CHUNK}s of a particular {HYPERTABLE}.

## Samples

```sql theme={"dark"}
SELECT remove_retention_policy('conditions');
```

Removes the existing data retention policy for the `conditions` table.

## Arguments

The syntax is:

```sql theme={"dark"}
SELECT remove_retention_policy(
    relation = '<hypertable_or_cagg_name>',
    if_exists = true | false
);
```

| Name        | Type     | Default | Required | Description                                                                    |
| ----------- | -------- | ------- | -------- | ------------------------------------------------------------------------------ |
| `relation`  | REGCLASS | -       | ✔        | Name of the hypertable or continuous aggregate from which to remove the policy |
| `if_exists` | BOOLEAN  | `false` | -        | Set to true to avoid throwing an error if the policy does not exist.           |

## Returns

This function returns void.

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