---
title: R2 Data Catalog now supports automatic snapshot expiration
description: Automatically remove old Apache Iceberg table snapshots to improve performance and reduce storage costs
image: https://developers.cloudflare.com/changelog-preview.png
---

[Skip to content](#%5Ftop) 

# Changelog

New updates and improvements at Cloudflare.

[ Subscribe to RSS ](https://developers.cloudflare.com/changelog/rss/index.xml) [ View RSS feeds ](https://developers.cloudflare.com/fundamentals/new-features/available-rss-feeds/) 

![hero image](https://developers.cloudflare.com/_astro/hero.CVYJHPAd_26AMqX.svg) 

[ ← Back to all posts ](https://developers.cloudflare.com/changelog/) 

## R2 Data Catalog now supports automatic snapshot expiration

Dec 18, 2025 

[ R2 ](https://developers.cloudflare.com/r2/) 

[R2 Data Catalog](https://developers.cloudflare.com/r2/data-catalog/) now supports automatic snapshot expiration for Apache Iceberg tables.

In Apache Iceberg, a snapshot is metadata that represents the state of a table at a given point in time. Every mutation creates a new snapshot which enable powerful features like time travel queries and rollback capabilities but will accumulate over time.

Without regular cleanup, these accumulated snapshots can lead to:

* Metadata overhead
* Slower table operations
* Increased storage costs.

Snapshot expiration in R2 Data Catalog automatically removes old table snapshots based on your configured retention policy, improving performance and storage costs.

Terminal window

```

# Enable catalog-level snapshot expiration

# Expire snapshots older than 7 days, always retain at least 10 recent snapshots

npx wrangler r2 bucket catalog snapshot-expiration enable my-bucket \

  --older-than-days 7 \

  --retain-last 10


```

Snapshot expiration uses two parameters to determine which snapshots to remove:

* `--older-than-days`: age threshold in days
* `--retain-last`: minimum snapshot count to retain

Both conditions must be met before a snapshot is expired, ensuring you always retain recent snapshots even if they exceed the age threshold.

This feature complements [automatic compaction](https://developers.cloudflare.com/r2/data-catalog/table-maintenance/), which optimizes query performance by combining small data files into larger ones. Together, these automatic maintenance operations keep your Iceberg tables performant and cost-efficient without manual intervention.

To learn more about snapshot expiration and how to configure it, visit our [table maintenance documentation](https://developers.cloudflare.com/r2/data-catalog/table-maintenance/) or see [how to manage catalogs](https://developers.cloudflare.com/r2/data-catalog/manage-catalogs/).