# 通过 Rails 控制台注销所有用户

**URL:** https://meta.discourse.org/t/logout-all-users-through-the-rails-console/93239
**Category:** Self-Hosting
**Tags:** how-to
**Created:** [2018 年7 月 26 日 22:13 UTC](https://meta.discourse.org/t/logout-all-users-through-the-rails-console/93239 "2018-07-26T22:13:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [2018 年7 月 26 日 22:13 UTC](https://meta.discourse.org/t/logout-all-users-through-the-rails-console/93239/1 "2018-07-26T22:13:01Z")

</div>

要注销所有用户，请进入 rails 控制台并运行

```ruby
UserAuthToken.destroy_all

```
