# How to reduce database size

**URL:** https://meta.discourse.org/t/how-to-reduce-database-size/110204
**Category:** Support
**Created:** [February 27, 2019, 3:44am UTC](https://meta.discourse.org/t/how-to-reduce-database-size/110204 "2019-02-27T03:44:42Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Tim\_Jefferies](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tim_jefferies/32/113296_2.png) [@Tim\_Jefferies](https://meta.discourse.org/u/Tim_Jefferies)
#### Post date: [February 27, 2019, 4:40am UTC](https://meta.discourse.org/t/how-to-reduce-database-size/110204/3 "2019-02-27T04:40:10Z")

</div>

I’d like to know how to do this as well.

I want to create a category that auto deletes posts. The idea is to have a space where people can speak freely knowing that whatever they post will auto delete after a certain time i.e. for privacy reasons.

I have a category set to auto close topics after 168 hours.  
Now I need to figure out how to delve into the DB (I expect a crontab task is the best way to do this) and delete any posts including uploaded images from the server that belong to this category and are auto closed.

How would I do that?

---

_[View the full topic](https://meta.discourse.org/t/how-to-reduce-database-size/110204)._
