# Delete user from discourse-docker using ssh

**URL:** <https://meta.discourse.org/t/delete-user-from-discourse-docker-using-ssh/37820>\
**Category:** Support\
**Created:** [January 12, 2016, 12:57pm UTC](https://meta.discourse.org/t/delete-user-from-discourse-docker-using-ssh/37820 "2016-01-12T12:57:28Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![yuquailon](https://avatars.discourse-cdn.com/v4/letter/y/9fc29f/32.png) [@yuquailon](https://meta.discourse.org/u/yuquailon)\
**Post date:** [January 12, 2016, 9:46pm UTC](https://meta.discourse.org/t/delete-user-from-discourse-docker-using-ssh/37820/5 "2016-01-12T21:46:09Z")

</div>

Hi,

I’ve tried the way @zogstrip told. The user is no more on the discourse yet I got internal server error when trying to open all of the topics that the user posted in.

The following lines are from production.log and it is the only log that I could fetch so far. What is going wrong?

```
Started GET "/t/bilginin-tamamina-sahip-olmadiginizda-fikir-sahibi-olmadan-once-yapmaniz-gereken-3-sey/10594" for 80.5.152.180 at 2016-01-12 21:36:57 +0000
Processing by TopicsController#show as HTML
  Parameters: {"slug"=>"bilginin-tamamina-sahip-olmadiginizda-fikir-sahibi-olmadan-once-yapmaniz-gereken-3-sey", "topic_id"=>"10594"}
Completed 500 Internal Server Error in 170ms (ActiveRecord: 23.8ms)
NoMethodError (undefined method ``id`` for nil:NilClass)
/var/www/discourse/app/serializers/topic_post_count_serializer.rb:6:in ``id'

```

**UPDATE:**  
The user’s posts are still on the posts table and the error is most likely because of that the user data  
of the post could not be found. Well, deleting posts of the user is just a simple query and I guess it is going to solve this but sanitizing all the data (post, like counts etc.) would take some time to achieve. Is there any sort of script to delete (or anonymize) all post data associated with a specific user (or user\_id)?

---

_[View the full topic](https://meta.discourse.org/t/delete-user-from-discourse-docker-using-ssh/37820)._
