# Cannot delete user

**URL:** https://meta.discourse.org/t/cannot-delete-user/42031
**Category:** Support
**Created:** [April 4, 2016, 11:55pm UTC](https://meta.discourse.org/t/cannot-delete-user/42031 "2016-04-04T23:55:59Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![zsero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zsero/32/64016_2.png) [@zsero](https://meta.discourse.org/u/zsero)
#### Post date: [April 4, 2016, 11:55pm UTC](https://meta.discourse.org/t/cannot-delete-user/42031/1 "2016-04-04T23:55:59Z")

</div>

Hi,

I created a test user, and now as an admin, I’m trying to delete that user, but I cannot as I get:

> There was an error deleting that user. Make sure all posts are deleted before trying to delete the user.

There is only one “private topic” listed, which I believe is the welcome post. How can I delete the user?

---

<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: [April 5, 2016, 12:54am UTC](https://meta.discourse.org/t/cannot-delete-user/42031/2 "2016-04-05T00:54:51Z")

</div>

I’ve had problems with this recently too @neil.

---

<div class="post-metadata">

### Author: ![zsero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zsero/32/64016_2.png) [@zsero](https://meta.discourse.org/u/zsero)
#### Post date: [April 5, 2016, 1:05am UTC](https://meta.discourse.org/t/cannot-delete-user/42031/3 "2016-04-05T01:05:57Z")

</div>

Also, might help: I created the user on 1.4.latest and I’m now on 1.5.0 release

---

<div class="post-metadata">

### Author: ![andrejkosyak](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrejkosyak/32/121582_2.png) [@andrejkosyak](https://meta.discourse.org/u/andrejkosyak)
#### Post date: [May 17, 2016, 11:09am UTC](https://meta.discourse.org/t/cannot-delete-user/42031/10 "2016-05-17T11:09:59Z")

</div>

I cannot delete user, getting the same error message.  
The Discourse version is `1.6.0.beta4`

I have also already impersonated user, set all the private messages on “Read”.

User activity from admin panel:

 ![](https://global.discourse-cdn.com/meta/original/3X/c/2/c22b27b7cd0020141e3668394cdca1b5d0a1dc96.png)

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [May 18, 2016, 12:41am UTC](https://meta.discourse.org/t/cannot-delete-user/42031/11 "2016-05-18T00:41:06Z")

</div>

I’m guessing it’s the “warning” message that needs to be deleted.

Not sure if you can though.

---

<div class="post-metadata">

### Author: ![andrejkosyak](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrejkosyak/32/121582_2.png) [@andrejkosyak](https://meta.discourse.org/u/andrejkosyak)
#### Post date: [May 18, 2016, 6:31am UTC](https://meta.discourse.org/t/cannot-delete-user/42031/12 "2016-05-18T06:31:04Z")

</div>

What do you mean? How can the warning message be deleted?

---

<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: [May 18, 2016, 6:33am UTC](https://meta.discourse.org/t/cannot-delete-user/42031/13 "2016-05-18T06:33:36Z")

</div>

This user received an official warning PM, which is .. rare. You’d need to visit the user page as admin, click messages, and then delete it from there.

---

<div class="post-metadata">

### Author: ![andrejkosyak](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrejkosyak/32/121582_2.png) [@andrejkosyak](https://meta.discourse.org/u/andrejkosyak)
#### Post date: [May 18, 2016, 11:28am UTC](https://meta.discourse.org/t/cannot-delete-user/42031/14 "2016-05-18T11:28:54Z")

</div>

ok, i have deleted the user, but actually deleting of the official waring had not helped.  
i still got the same error message when i was trying to delete the user from admin panel, when just clicked on the user and pressed **Delete User** button in the bottom-right of the page.

what has worked out is the button **Delete** (yes, not Delete User) in the header of the page when going to **Show Public Profile**.

so it looks like those two delete buttons have different functionality. might be a bug?

---

<div class="post-metadata">

### Author: ![Silventus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/silventus/32/46997_2.png) [@Silventus](https://meta.discourse.org/u/Silventus)
#### Post date: [October 10, 2016, 12:07pm UTC](https://meta.discourse.org/t/cannot-delete-user/42031/15 "2016-10-10T12:07:42Z")

</div>

I’m having this issue now. Player requested we delete his account, he has made no posts, only sent a PM to request the account be deleted.

 ![](https://global.discourse-cdn.com/meta/original/3X/5/f/5fe0a1f999b4c34a20e47dd1e93e917cf107e32f.PNG)

---

<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: [October 10, 2016, 7:04pm UTC](https://meta.discourse.org/t/cannot-delete-user/42031/16 "2016-10-10T19:04:34Z")

</div>

Try deleting the PM first, then.

---

<div class="post-metadata">

### Author: ![lostintime](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lostintime/32/54115_2.png) [@lostintime](https://meta.discourse.org/u/lostintime)
#### Post date: [October 19, 2017, 9:39am UTC](https://meta.discourse.org/t/cannot-delete-user/42031/17 "2017-10-19T09:39:01Z")

</div>

I am also having this issue (Discourse 1.8 on [Communiteq](https://www.communiteq.com) (formerly DiscourseHosting))

The user has no posts and I have manually deleted the PMs that he was sent by the system as I blocked him because it seems to be a spam account.

Here’s a screenshot from the admin panel (in German):

 ![spam-user](https://global.discourse-cdn.com/meta/original/3X/f/7/f7338ba263dbc6bf88c0c9e00a69d17df3251256.png)

Blocking him will prevent him from posting but I would really like to get rid of his account.

Any tips? Thanks!

---

<div class="post-metadata">

### Author: ![lostintime](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lostintime/32/54115_2.png) [@lostintime](https://meta.discourse.org/u/lostintime)
#### Post date: [October 20, 2017, 3:54pm UTC](https://meta.discourse.org/t/cannot-delete-user/42031/18 "2017-10-20T15:54:39Z")

</div>

Anyone?

This user is worrying me …

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [October 20, 2017, 4:01pm UTC](https://meta.discourse.org/t/cannot-delete-user/42031/19 "2017-10-20T16:01:37Z")

</div>

Would Anonymize be an option?

It isn’t the same as a complete purge of a members existence but it might suffice for your needs.

For example, check out

> **[@anon73329944](https://meta.discourse.org/u/anon73329944/summary)**

---

<div class="post-metadata">

### Author: ![lostintime](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lostintime/32/54115_2.png) [@lostintime](https://meta.discourse.org/u/lostintime)
#### Post date: [October 20, 2017, 4:35pm UTC](https://meta.discourse.org/t/cannot-delete-user/42031/20 "2017-10-20T16:35:44Z")

</div>

I guess I will resort to that if it’s the only option, @Mittineague.

The thing is that I’m afraid that I will end up with lots of users like that since I don’t know what caused the deletion problem in het first place and I do not want to happen it again …

---

<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: [October 21, 2017, 2:00am UTC](https://meta.discourse.org/t/cannot-delete-user/42031/21 "2017-10-21T02:00:59Z")

</div>

I have seen this again recently, @neil, users with no posts that I could not delete, even after checking PMs.

---

<div class="post-metadata">

### Author: ![lostintime](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lostintime/32/54115_2.png) [@lostintime](https://meta.discourse.org/u/lostintime)
#### Post date: [October 21, 2017, 7:17am UTC](https://meta.discourse.org/t/cannot-delete-user/42031/22 "2017-10-21T07:17:47Z")

</div>

Thanks for looking into it, guys.

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [October 23, 2017, 2:20pm UTC](https://meta.discourse.org/t/cannot-delete-user/42031/23 "2017-10-23T14:20:32Z")

</div>

If they were users here on meta, PM me their usernames so I can look at it.

---

<div class="post-metadata">

### Author: ![n-b-sonar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/n-b-sonar/32/119822_2.png) [@n-b-sonar](https://meta.discourse.org/u/n-b-sonar)
#### Post date: [February 16, 2018, 3:43pm UTC](https://meta.discourse.org/t/cannot-delete-user/42031/24 "2018-02-16T15:43:56Z")

</div>

New Discourse user here, playing with hosted instance since this morning, and now fiddling with authentication/authorization.

Hitting the exact same issue: a colleague of mine signed-up locally (note: I’ve also enabled a few oauth2 providers), then logged-out, then as admin I went to delete him (_delete only_) → no can do 😕 (_There was an error deleting that user. Make sure all posts are deleted before trying to delete the user._)

Maybe relevant:

- he has the discobot greetings PM in his inbox, deleting it did not make any difference
- I got him to create a topic and then log back out, still can’t delete him
- his email domain matches an auto-join primary group I defined (can’t remove him from the group either in fact, which I’m not sure is a feature or an anomaly given that his domain does match)

Let me know if any further info could help, I’ve tried to share as much relevant info from what I learned in just a day (started trial this morning).

Thanks,  
Nicolas

Note: noticed other traces of such behaviour in this much more recent post

> [@Cannot delete user who is in a group](https://meta.discourse.org/t/cannot-delete-user-who-is-in-a-group/78799):
>
> Hey., @jomaxro, working with a hosted customer today we tried to delete a user. There was a message that the user had posts and couldn’t be deleted, but there were no posts, but the user was in a group. When we deleted the user from group it was possible to delete the user.

But that issue is closed, hence why I reached out here

---

<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: [February 16, 2018, 11:16pm UTC](https://meta.discourse.org/t/cannot-delete-user/42031/25 "2018-02-16T23:16:22Z")

</div>

Yeah I would suspect the group in this case. Can we repro this @jomaxro?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [February 17, 2018, 1:25am UTC](https://meta.discourse.org/t/cannot-delete-user/42031/27 "2018-02-17T01:25:18Z")

</div>

Confirmed that disabling the group auto-add for the user’s email domain AND manually removing them from the group let me delete the user.

[Next page](https://meta.discourse.org/t/cannot-delete-user/42031.md?page=2)
