# Delete empty partitions

**URL:** https://community.cratedb.com/t/delete-empty-partitions/138
**Category:** CrateDB
**Created:** [January 29, 2019, 2:47pm UTC](https://community.cratedb.com/t/delete-empty-partitions/138 "2019-01-29T14:47:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ruben](https://avatars.discourse-cdn.com/v4/letter/r/59ef9b/32.png) [@Ruben](https://community.cratedb.com/u/Ruben)
#### Post date: [January 29, 2019, 2:47pm UTC](https://community.cratedb.com/t/delete-empty-partitions/138/1 "2019-01-29T14:47:58Z")

</div>

Hi All,  
I have a process that deletes old data. This means partitions that are older then the set limit will be empty but still there.  
Is there a easy query to delete all the empty partitions?

---

<div class="post-metadata">

### Author: ![Ruben](https://avatars.discourse-cdn.com/v4/letter/r/59ef9b/32.png) [@Ruben](https://community.cratedb.com/u/Ruben)
#### Post date: [January 29, 2019, 3:44pm UTC](https://community.cratedb.com/t/delete-empty-partitions/138/2 "2019-01-29T15:44:18Z")

</div>

Did it with an alternative route. Got the partition number of the oldest data in the db and removed all that is older than this partition value.
