# How to programmatically log out lots of users

**URL:** <https://meta.discourse.org/t/how-to-programmatically-log-out-lots-of-users/37611>\
**Category:** Product Support\
**Created:** [7 يناير 2016، 9:16م UTC](https://meta.discourse.org/t/how-to-programmatically-log-out-lots-of-users/37611 "2016-01-07T21:16:47Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [17 ديسمبر 2018، 3:56ص UTC](https://meta.discourse.org/t/how-to-programmatically-log-out-lots-of-users/37611/18 "2018-12-17T03:56:08Z")

</div>

Current best practice is:

```plaintext
./launcher enter app
rails c
UserAuthToken.delete_all

```

Also … for extra safety you could also delete all user api keys used for the app with

```plaintext
UserApiKey.delete_all

```

---

_[View the full topic](https://meta.discourse.org/t/how-to-programmatically-log-out-lots-of-users/37611)._
