# 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:** 6

<div class="post-metadata">

**Author:** ![chrisc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisc/32/119982_2.png) [@chrisc](https://meta.discourse.org/u/chrisc)\
**Post date:** [May 24, 2018, 3:49pm UTC](https://meta.discourse.org/t/delete-user-from-discourse-docker-using-ssh/37820/6 "2018-05-24T15:49:22Z")

</div>

> [@zogstrip](#):
>
> you can delete a user with
> 
> ```plaintext
> User.find_by(username: "foobar").destroy
> 
> ```

What would the syntax be to do this by user id?

```plaintext
User.find_by(id: "foobar").destroy

```

---

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