title: How to atomically delete millions of keys matching a pattern using pure Redis?
body: <p>Say I have millions of <code>prefix:&lt;numeric_id&gt;</code> keys.</p>
  
  <p>I want to purge them all atomically.</p>
  
  <p><a href="https://stackoverflow.com/questions/4006324/how-to-atomically-delete-keys-matching-a-pattern-using-redis">How to atomically delete keys matching a pattern using Redis</a> shows many options. Some use <code>redis-cli</code> or Bash script but I need to do it using my client, programmatically. </p>
  
  <p>A Lua script approach is promising, but solutions with <code>KEYS</code> command fail with "too many elements to unpack" error.</p>
  
  <p>How to achieve this?</p>