# Can you remove the history automatically from Iceberg Tables?

**URL:** <https://community.dremio.com/t/can-you-remove-the-history-automatically-from-iceberg-tables/10977>\
**Category:** Uncategorized\
**Created:** [September 6, 2023, 10:27pm UTC](https://community.dremio.com/t/can-you-remove-the-history-automatically-from-iceberg-tables/10977 "2023-09-06T22:27:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgoldsmith](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@sgoldsmith](https://community.dremio.com/u/sgoldsmith)\
**Post date:** [September 6, 2023, 10:27pm UTC](https://community.dremio.com/t/can-you-remove-the-history-automatically-from-iceberg-tables/10977/1 "2023-09-06T22:27:10Z")

</div>

We currently have a process where we are running a DELETE job then an INSERT job on a table with a few billion records. We will often delete/insert 10-20 million records which we found (because of Iceberg’s snapshots) that this will often cause a large increase in disk usage until we are able to use VACUUM to remove the deleted records from disk.

Is there any way to turn off snapshots completely? We don’t plan on using snapshots to look at historical data and it will just be extra work to have to vacuum it every day so it would be nice if we could just skip that step completely and never retain the deleted data in the first place.

---

<div class="post-metadata">

**Author:** ![dch](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/dch/32/4140_2.png) [@dch](https://community.dremio.com/u/dch)\
**Post date:** [September 6, 2023, 10:30pm UTC](https://community.dremio.com/t/can-you-remove-the-history-automatically-from-iceberg-tables/10977/2 "2023-09-06T22:30:04Z")

</div>

Not at the moment however something that is currently on the backlog

---

<div class="post-metadata">

**Author:** ![Nisden](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/nisden/32/5453_2.png) [@Nisden](https://community.dremio.com/u/Nisden)\
**Post date:** [March 7, 2024, 8:20am UTC](https://community.dremio.com/t/can-you-remove-the-history-automatically-from-iceberg-tables/10977/3 "2024-03-07T08:20:18Z")

</div>

Have this become a feature yet?

---

<div class="post-metadata">

**Author:** ![dotjdk](https://avatars.discourse-cdn.com/v4/letter/d/a9a28c/32.png) [@dotjdk](https://community.dremio.com/u/dotjdk)\
**Post date:** [March 7, 2024, 9:50am UTC](https://community.dremio.com/t/can-you-remove-the-history-automatically-from-iceberg-tables/10977/4 "2024-03-07T09:50:47Z")

</div>

Can’t you just run a `VACUUM TABLE <table_name> EXPIRE SNAPSHOTS retain_last 1` after you modify the table?

The amount of work for the system will be the same, as the old parquet files would have to be deleted anyways

---

<div class="post-metadata">

**Author:** ![Nisden](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/nisden/32/5453_2.png) [@Nisden](https://community.dremio.com/u/Nisden)\
**Post date:** [March 7, 2024, 10:04am UTC](https://community.dremio.com/t/can-you-remove-the-history-automatically-from-iceberg-tables/10977/5 "2024-03-07T10:04:27Z")

</div>

Well, VACUUM seems to require a lot of permissions to execute.  
So it would be a lot easier if it was more gracefully handled.
