# Remove all users except admins or a few select users whichever is easier

**URL:** <https://meta.discourse.org/t/remove-all-users-except-admins-or-a-few-select-users-whichever-is-easier/249199>\
**Category:** Product Support\
**Created:** [December 17, 2022, 1:28am UTC](https://meta.discourse.org/t/remove-all-users-except-admins-or-a-few-select-users-whichever-is-easier/249199 "2022-12-17T01:28:43Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![adambirds](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adambirds/32/131854_2.png) [@adambirds](https://meta.discourse.org/u/adambirds)\
**Post date:** [December 17, 2022, 1:28am UTC](https://meta.discourse.org/t/remove-all-users-except-admins-or-a-few-select-users-whichever-is-easier/249199/1 "2022-12-17T01:28:43Z")

</div>

Is there a quick script which will allow me to bulk remove all users except either admins or a select few users identified by their IDs/emails? Whichever option is easier is fine.

Will want to do this from the rails console.

Thanks

---

_[View the full topic](https://meta.discourse.org/t/remove-all-users-except-admins-or-a-few-select-users-whichever-is-easier/249199)._
