Skip to content
TimescaleDB - Timeseries database for PostgreSQL Docs
  • Timescale.com
  • Try for free
Get started
Create your first Timescale service
Try the key Timescale features
Start coding with Timescale
About Timescale products
Timescale architecture for real-time analytics
Pricing plans and account management
Changelog
Use Timescale
Hypertables
Hypercore
Continuous aggregates
Tutorials
Integrations
API Reference
Hypertables & chunks
Hypercore
Continuous aggregates
Data retention
add_retention_policy
remove_retention_policy
Jobs and automation
Hyperfunctions
Informational views
Configuration
Administration Functions
API Reference Tag Overview
Compression (Old API, replaced by Hypercore)
Distributed hypertables (Sunsetted v2.14.x)
Migrate and sync data to Timescale Cloud
AI and Vector: pgai on Timescale
Other deployment options
Find a docs page
TimescaleDB API reference

Data Retention

CommunityCommunity functions are available under Timescale Community Edition. Click to learn more.

An intrinsic part of time-series data is that new data is accumulated and old data is rarely, if ever, updated. This means that the relevance of the data diminishes over time. It is therefore often desirable to delete old data to save disk space.

With TimescaleDB, you can manually remove old chunks of data or implement policies using these APIs.

For more information about creating a data retention policy, see the data retention section.

Keywords

data retentiondelete

Found an issue on this page?Report an issue or Edit this page in GitHub.

Previoushypertable_detailed_sizeNextadd_retention_policy

Related Content

drop_chunks()
Delete chunks by time range
add_retention_policy()
Add a policy to drop older chunks
remove_retention_policy()
Remove a retention policy from a hypertable
Manually drop chunks
If data retention policies don't meet your ad hoc needs, you can manually drop chunks from your hypertables based on time value. Learn how to do it in Timescale Cloud
Create a data retention policy
Create a data retention policy to automatically drop historical data from your hypertables when it reaches a certain age. Timescale Cloud enables you to save on storage while speeding up your queries
remove_reorder_policy()
Remove a reorder policy from a hypertable