# Delete deleted-posts permanently in bulk?

**URL:** https://meta.discourse.org/t/delete-deleted-posts-permanently-in-bulk/203289
**Category:** Support
**Created:** [September 12, 2021, 4:15am UTC](https://meta.discourse.org/t/delete-deleted-posts-permanently-in-bulk/203289 "2021-09-12T04:15:12Z")
**Posts on this page:** 1
**Showing post:** 19

<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: [September 17, 2021, 4:08pm UTC](https://meta.discourse.org/t/delete-deleted-posts-permanently-in-bulk/203289/19 "2021-09-17T16:08:56Z")

</div>

I’m afraid I’m at the start of my Discourse journey, so lack the necessary expertise for that. 🙂

Is it possible to amend this to target deleted posts rather than a user’s posts to achieve a similar thing?

> [@Deleting a users posts (with large post count+history)](https://meta.discourse.org/t/deleting-a-users-posts-with-large-post-count-history/82439/2):
>
> I think that what you’ll need to do is select all posts owned by the user and replace the post with Post deleted at request of user Something like Post.where("id = 123").update\_all(raw: "Post deleted...") That’s not tested. You’d want to test it. I’m not sure if you’d need to rebake those posts or not. Edit: I think that’d still leave the edit history, though. But, maybe only if there were an edit history.

---

_[View the full topic](https://meta.discourse.org/t/delete-deleted-posts-permanently-in-bulk/203289)._
