---
acl_categories:
- '@timeseries'
- '@write'
- '@fast'
arguments:
- name: sourceKey
type: key
- name: destKey
type: key
categories:
- docs
- develop
- stack
- oss
- rs
- rc
- oss
- kubernetes
- clients
complexity: O(1)
description: Delete a compaction rule
group: timeseries
hidden: false
linkTitle: TS.DELETERULE
module: TimeSeries
railroad_diagram: /images/railroad/ts.deleterule.svg
since: 1.0.0
stack_path: docs/data-types/timeseries
summary: Delete a compaction rule
syntax_fmt: TS.DELETERULE sourceKey destKey
title: TS.DELETERULE
---
{{< note >}}
This command's behavior varies in clustered Redis environments. See the [multi-key operations]({{< relref "/develop/using-commands/multi-key-operations" >}}) page for more information.
{{< /note >}}
Delete a compaction rule
## Required arguments
sourceKey
is key name for the source time series.
destKey
is key name for destination (compacted) time series.
Note: This command does not delete the compacted series.
## Redis Software and Redis Cloud compatibility
| Redis
Software | Redis
Cloud | Notes |
|:----------------------|:-----------------|:------|
| ✅ Supported
| ✅ Flexible & Annual
✅ Free & Fixed | |
## Return information
{{< multitabs id="ts-deleterule-return-info"
tab1="RESP2"
tab2="RESP3" >}}
One of the following:
* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` when the compaction rule is deleted successfully.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, or when such rule does not exist.
-tab-sep-
One of the following:
* [Simple string reply]({{< relref "/develop/reference/protocol-spec#simple-strings" >}}): `OK` when the compaction rule is deleted successfully.
* [Simple error reply]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) in these cases: invalid arguments, or when such rule does not exist.
{{< /multitabs >}}
## See also
[`TS.CREATERULE`]({{< relref "commands/ts.createrule/" >}})
## Related topics
[RedisTimeSeries]({{< relref "/develop/data-types/timeseries/" >}})