---
title: Understand data retention | Tiger Data Docs
description: Discard old data as it reaches a certain age, manually or by setting up automated policies
---

In modern applications, data grows exponentially. As data gets older, it often becomes less useful in day-to-day operations. However, you still need it for analysis. TimescaleDB elegantly solves this problem with [automated data retention policies](/docs/build/data-management/data-retention/create-a-retention-policy/index.md).

Data retention policies delete raw old data for you on a schedule that you define. By [combining retention policies with continuous aggregates](/docs/learn/data-lifecycle/data-retention/data-retention-with-continuous-aggregates/index.md), you can downsample your data and keep useful summaries of it instead. This lets you analyze historical data - while also saving on storage.

## Drop data by chunk

TimescaleDB data retention works on chunks, not on rows. Deleting data row-by-row, for example, with the PostgreSQL `DELETE` command, can be slow. But dropping data by the chunk is faster, because it deletes an entire file from disk. It doesn’t need garbage collection and defragmentation.

Whether you use a policy or manually drop chunks, TimescaleDB drops data by the chunk. It only drops chunks where all the data is within the specified time range.

For example, consider the setup where you have 3 chunks containing data:

1. More than 36 hours old
2. Between 12 and 36 hours old
3. From the last 12 hours

You manually drop chunks older than 24 hours. Only the oldest chunk is deleted. The middle chunk is retained, because it contains some data newer than 24 hours.

## Get hands on

[Create a retention policy](/docs/build/data-management/data-retention/create-a-retention-policy/index.md)

[Step-by-step guide to automating data deletion.](/docs/build/data-management/data-retention/create-a-retention-policy/index.md)

[Data retention with continuous aggregates](/docs/learn/data-lifecycle/data-retention/data-retention-with-continuous-aggregates/index.md)

[Keep aggregated data while dropping raw data.](/docs/learn/data-lifecycle/data-retention/data-retention-with-continuous-aggregates/index.md)

[Manually drop chunks](/docs/learn/data-lifecycle/data-retention/manually-drop-chunks/index.md)

[One-time deletion of chunks by time range.](/docs/learn/data-lifecycle/data-retention/manually-drop-chunks/index.md)

## Learn more

- [Understand tiered storage](/docs/learn/data-lifecycle/storage/about-storage-tiers/index.md): Move old data to low-cost storage instead of deleting it.
- [`add_retention_policy()` reference](/docs/reference/timescaledb/data-retention/add_retention_policy/index.md): Full API reference.
- [`drop_chunks()` reference](/docs/reference/timescaledb/hypertables/drop_chunks/index.md): Manual chunk deletion API.
