# Ik krijg een 502-fout bij het proberen te verwijderen van onderwerpen die door een specifieke gebruiker zijn aangemaakt

**URL:** https://meta.discourse.org/t/i-am-getting-502-error-while-trying-to-delete-topics-created-by-specific-user/261161
**Category:** Support
**Created:** [10 april 2023 om 09:31 UTC](https://meta.discourse.org/t/i-am-getting-502-error-while-trying-to-delete-topics-created-by-specific-user/261161 "2023-04-10T09:31:52Z")
**Posts on this page:** 1
**Showing post:** 24

<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: [12 juni 2023 om 11:59 UTC](https://meta.discourse.org/t/i-am-getting-502-error-while-trying-to-delete-topics-created-by-specific-user/261161/24 "2023-06-12T11:59:03Z")

</div>

Is this topic any use to you?

> [@Delete deleted-posts permanently in bulk?](https://meta.discourse.org/t/delete-deleted-posts-permanently-in-bulk/203289/57):
>
> Excellent, glad to hear that did the job for you. So for the sake of combining the answers, one can use the following in the Rails console to destroy all topics that were deleted more than 90 days ago, repeating as many times as necessary if there are more than 1000 topics: Topic.with\_deleted.where(deleted\_at: ...90.days.ago).limit(1000).destroy\_all After that has completed, the following can be used to destroy all posts that have been orphaned from destroyed topics: Post.find\_by\_sql("select …

I don’t think it’s exactly what you’re after, but you may be able to amend it to target what you need?

---

_[View the full topic](https://meta.discourse.org/t/i-am-getting-502-error-while-trying-to-delete-topics-created-by-specific-user/261161)._
