# Purge/clean/delete deleted topics from database

**URL:** https://meta.discourse.org/t/purge-clean-delete-deleted-topics-from-database/300881
**Category:** Support
**Created:** [March 25, 2024, 9:04pm UTC](https://meta.discourse.org/t/purge-clean-delete-deleted-topics-from-database/300881 "2024-03-25T21:04:14Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [July 5, 2025, 9:16am UTC](https://meta.discourse.org/t/purge-clean-delete-deleted-topics-from-database/300881/4 "2025-07-05T09:16:05Z")

</div>

> [@Neil\_Evans](#):
>
> Surely soft-deleted items get deleted eventually, otherwise the database will grow forever??

Unfortunately there isn’t currently any automatic cleanup of soft-deleted posts, and no manual bulk option in the UI either. The rails console is still the way to approach this if you need to do it.

There are a few topics with some info in about how others have approached it. I think this one may be a good example to get both topics and posts (though will need a tweak to tailor it for your own use case) [How to delete thousands of Personal Messages? - #7 by RGJ](https://meta.discourse.org/t/how-to-delete-thousands-of-private-messages/162747/7). And remember to take a backup before trying anything destructive in the rails console as accidents can happen. 🙂

I think this is the relevant #Contribute > Feature request with the most recent activity if you’d like to add your vote and voice to it:

> [@Permanent bulk delete of old topics](https://meta.discourse.org/t/permanent-bulk-delete-of-old-topics/24450):
>
> Our forum is near by reaching first year of usage. Some of our category / topic is used for daily work, We have lot of topics which is irrelevant in perspective of holding for long time. Is there any feature or plan to implement some kind of deleting or archiving old topics. Is there way to BULK delete topics using some kind of SQL queries. Cloud I do something like in XX category delete all topics (post) older then date 1.1.2015. Why I’ll love to delete posts is because I do not want to …

---

_[View the full topic](https://meta.discourse.org/t/purge-clean-delete-deleted-topics-from-database/300881)._
