# Can't delete a user's posts: InvalidForeignKey

**URL:** https://meta.discourse.org/t/cant-delete-a-users-posts-invalidforeignkey/398175
**Category:** Support
**Created:** [March 11, 2026, 2:53pm UTC](https://meta.discourse.org/t/cant-delete-a-users-posts-invalidforeignkey/398175 "2026-03-11T14:53:59Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![darkpixlz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darkpixlz/32/549896_2.png) [@darkpixlz](https://meta.discourse.org/u/darkpixlz)
#### Post date: [March 11, 2026, 3:21pm UTC](https://meta.discourse.org/t/cant-delete-a-users-posts-invalidforeignkey/398175/2 "2026-03-11T15:21:32Z")

</div>

Looks like this is a bug and at the moment you need to delete the comment:

> [@User deletion problem, returns "Error 500" on delete all posts](https://meta.discourse.org/t/user-deletion-problem-returns-error-500-on-delete-all-posts/397700/3):
>
> Thanks! Your guess was spot on. User had few flagged posts by moderators and one of them had a note added. After deleting the note I could then successfully delete user all users posts and user it self. By the way, is the bug already fixed in default branch? Maybe it’s time for updates. EDIT: note on version/build for reference of any others that maybe encounter similar issue: v2026.1.0-latest mid-January container build on default tests-passed branch.

---

_[View the full topic](https://meta.discourse.org/t/cant-delete-a-users-posts-invalidforeignkey/398175)._
