<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How can I find all users except one?]]></title><description><![CDATA[<p dir="auto">I want to delete all the users in the system except one. I know I can use the bulk delete functionality, but how can I exclude just one user?</p>
<p dir="auto">I am using the elasticsearch search engine.</p>
]]></description><link>https://fusionauth.io/community/forum/topic/273/how-can-i-find-all-users-except-one</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 10:01:37 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/273.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 03 Aug 2020 20:43:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How can I find all users except one? on Mon, 03 Aug 2020 20:47:07 GMT]]></title><description><![CDATA[<p dir="auto">You can use the admin ui to build the query string.</p>
<p dir="auto">Definitely test it out with the search first, and then use the <a href="https://fusionauth.io/docs/v1/tech/apis/users#bulk-delete-users" rel="nofollow ugc">bulk delete api</a>.</p>
<p dir="auto">Here's a shell script that searches for all users except one:</p>
<pre><code>curl -vvv -XGET -H "Authorization: $API_KEY" 'http://localhost:9011/api/user/search/?queryString=NOT%20email:test%40example.com'
</code></pre>
<p dir="auto">Note that I had to escape the space and the <code>@</code> sign, but here's the elasticsearch query without the escaping: <code>NOT email:test@example.com</code>.</p>
<p dir="auto">Also, if you are using the database search engine, the syntax will be entirely different, as this example relies on the Elasticsearch syntax.</p>
]]></description><link>https://fusionauth.io/community/forum/post/756</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/756</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Mon, 03 Aug 2020 20:47:07 GMT</pubDate></item></channel></rss>