Deleting multiple users in bulk

Discourse provides two powerful features for managing users at scale: searching for multiple users at once and deleting them in bulk. These features are especially useful for support workflows where you have a list of users to review, or for cleaning up spam accounts.

Search for multiple users at once

The admin users list search box supports searching for multiple users at the same time. You can type multiple usernames or email addresses separated by commas or spaces.

To use this feature:

  1. Go to /admin/users/list/active or any of its variants (new, staff, suspended, silenced).
  2. In the search box, enter the usernames or email addresses you want to find, separated by commas or spaces. For example:
    • sam, bob — finds users with usernames or emails containing “sam” or “bob”
    • sam@example.com, bob@example.com — finds users with exact email matches
    • sam, bob@example.com — a mix of usernames and emails works too
  3. The list updates in real time as you type, showing matching users.

The search hint in the search box reads: “usernames or emails (comma or space separated), or an IP address”.

How the search works

When you search with a single term, the search behaves as before: it looks for substring matches on the username or primary email, and you can also search by IP address.

When you search with multiple terms, the search looks for:

  • Substring matches on the username and primary email — so searching sam will find sam123 and sam@example.com
  • Exact matches on the email address for terms that look like emails (contain an @ sign) — this includes secondary emails
  • IP address search is disabled when you search with multiple terms

You can search for up to 100 terms at once.

Shareable search URLs

The search is also shareable via URL. When you type in the search box, the address bar updates with a filter query parameter. For example:

/admin/users/list/active?filter=sam,bob@example.com

You can bookmark this URL or share it with other administrators. Visiting such a URL prefills the search box and applies the filter automatically.

Search across tabs

The search is specific to each tab. When you switch tabs (for example, from “Active” to “New”), the search is cleared. This means you can start a fresh search in each tab without interference.

Delete multiple users in bulk

Once you have found the users you want to manage, you can delete them in bulk.

To use this feature:

  1. Enable the bulk select mode by clicking the bulk select icon image at the top of the user list next to the Username column.
  2. A checkbox appears next to each user. Select the users you want to delete.
  3. From the “Bulk actions” dropdown that appears at the top of the list, select “Delete users…”.
  4. In the confirmation modal, type the confirmation phrase.
  5. Optionally, select the option for blocking the IP and email addresses of the selected users.
  6. Confirm the delete operation.

After you initiate the delete operation, the confirmation modal updates to display the real-time progress as each user is deleted. If any errors occur during the deletion process, they appear in the modal while continuing to process the remaining users.

Caveats

  • You can delete up to 100 users in one go.
  • Users that cannot be deleted show a disabled checkbox. Hovering over the checkbox shows a tooltip explaining why they cannot be deleted.
  • When using bulk selection mode, you can refine your search to find specific users. The users you select are remembered even as you modify your search term or remove it completely. This makes it convenient to select users across different search results.

Best practices for user management

  • Regularly review new users: Keep an eye on the /admin/users/list/new page. This is often the first place you spot suspicious activity or potential spammers.
  • Use screened IPs and emails: Proactively block known spam sources under Admin > Logs > Screened IPs and Screened Emails.
  • Familiarize yourself with trust levels: Discourse trust levels form a fundamental part of your community’s immune system, granting more permissions to trusted users over time. Read the guide to understanding Discourse trust levels.
  • Establish clear community guidelines: A good set of guidelines helps set expectations for behavior and makes moderation decisions easier. See the Discourse guidelines.
  • Manage permissions with groups: Use groups to manage access to categories and features instead of assigning permissions to individual users.
  • Automate inactive user cleanup: The clean_up_inactive_users_after_days site setting can automatically remove inactive trust level 0 users with no posts after a specified number of days (disabled by default).

FAQs

Can I search by IP address when using multiple terms?

No. When you provide multiple search terms, IP address search is disabled. If you need to search by IP, use a single term.

How many users can I search for at once?

You can search for up to 100 terms (usernames or emails) at once.

Do I need to separate terms with commas?

You can use commas, spaces, or a mix of both. For example, sam bob and sam,bob both work.

Does the search match partial usernames?

Yes, for usernames and primary emails the search uses substring matching. For email addresses that contain an @ sign, the search uses exact matching (including secondary emails).

What happens to my selected users when I change the search?

Your selected users are remembered even as you modify the search term or remove it completely. This makes it easy to select users across different search results.

Additional resources

Last edited by @dax 2026-07-09T17:01:49Z

Last checked by @hugh 2025-11-03T04:15:16Z

Check documentPerform check on document:
5 Likes

How would I do the former in Discourse? Can you assign permissions on a per-user basis?

What is the connection between deactivating or anonymizing and a setting for deleting users? I thought deactivating or anonymizing doesn’t delete posts.

1 Like

July 2026: the guide has been updated to reflect the new functionality introduced with this commit, which allows searching for multiple users simultaneously from the admin users list.