---
title: remove_compaction_policy() | Tiger Data Docs
description: Remove a compaction policy from a hypertable
---

Since [2.29.0](https://github.com/timescale/timescaledb/releases/tag/2.29.0)

Remove a [compaction policy](/reference/timescaledb/hypercore/add_compaction_policy/index.md) from a hypertable.

Unordered chunks are no longer compacted automatically, so queries against them keep the extra sort step needed to restore order. To restart automatic compaction, call [add\_compaction\_policy](/reference/timescaledb/hypercore/add_compaction_policy/index.md) again. Turning off `direct_compress` also removes the policy it created.

## Samples

You see the compaction policies in the [informational views](/reference/timescaledb/informational-views/jobs/index.md).

- **Remove the compaction policy from the `metrics` hypertable**:

  ```
  SELECT remove_compaction_policy('metrics');
  ```

## Arguments

The syntax is:

```
SELECT remove_compaction_policy(
    hypertable = '<hypertable_name>',
    if_exists = true | false
);
```

| Name         | Type     | Default | Required | Description                                                                                                               |
| ------------ | -------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------- |
| `hypertable` | REGCLASS | -       | ✔        | Name of the hypertable to remove the policy from                                                                          |
| `if_exists`  | BOOLEAN  | `false` | ✖        | Set to `true` so this job fails with a warning rather than an error if a compaction policy does not exist on `hypertable` |

## Returns

This function returns void.
