# Deleting a users posts (with large post count+history)

**URL:** https://meta.discourse.org/t/deleting-a-users-posts-with-large-post-count-history/82439
**Category:** Support
**Created:** [March 7, 2018, 6:33pm UTC](https://meta.discourse.org/t/deleting-a-users-posts-with-large-post-count-history/82439 "2018-03-07T18:33:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![cookywook](https://avatars.discourse-cdn.com/v4/letter/c/779978/32.png) [@cookywook](https://meta.discourse.org/u/cookywook)
#### Post date: [March 7, 2018, 6:33pm UTC](https://meta.discourse.org/t/deleting-a-users-posts-with-large-post-count-history/82439/1 "2018-03-07T18:33:08Z")

</div>

Hello,

A user has asked to leave our Community, and wants all their posts removed. They’ve been a Community member for a few years, so have a large number of posts and topics created.

I can overrule the ‘max post delete’ options in the admin, but I wanted to sense check the next steps. If anyone else has any experience of this, it’d be great.

Unfortunately the user has turned down the option to simply anonymise the account, so we’re having to do a full deletion.

Am I right in thinking that this will also delete all the topics the user has made, even if they contained posts by other users? Is there any way to avoid this, beyond manually reassigning all of their topics to another account?

And is there anything else that might break during this process?

Thanks.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 7, 2018, 11:20pm UTC](https://meta.discourse.org/t/deleting-a-users-posts-with-large-post-count-history/82439/2 "2018-03-07T23:20:04Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 8, 2018, 7:21am UTC](https://meta.discourse.org/t/deleting-a-users-posts-with-large-post-count-history/82439/3 "2018-03-08T07:21:12Z")

</div>

> [@cookywook](#):
>
> Unfortunately the user has turned down the option to simply anonymise the account, so we’re having to do a full deletion.

If you are using the default licensing files included with Discourse, then under the creative commons license, **the user doesn’t have the right to pull all their content**. Anonymization is all that is guaranteed.

> [@Allow removing account info without content deletion](https://meta.discourse.org/t/allow-removing-account-info-without-content-deletion/25913/5):
>
> There is an analog here for what we used to do with accounts on Stack Exchange and Creative Commons, too – you pull the username and keep the content as it belongs to the community, and removing it might take something of value from the commons. Note that Creative Commons is [also the default for Discourse installs](https://meta.discourse.org/tos) unless site operators specify differently in their ToS: 3) User Content License User contributions are licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unp…](http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_US)

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [June 30, 2020, 5:15am UTC](https://meta.discourse.org/t/deleting-a-users-posts-with-large-post-count-history/82439/4 "2020-06-30T05:15:10Z")

</div>


