Skip to content

Instantly share code, notes, and snippets.

@JeromeParadis
Created September 25, 2011 06:22
Show Gist options
  • Save JeromeParadis/1240295 to your computer and use it in GitHub Desktop.
Save JeromeParadis/1240295 to your computer and use it in GitHub Desktop.
Redis: How delete keys matching a pattern?
redis-cli KEYS "prefix:*" | xargs redis-cli DEL
@ghmcadams
Copy link

I just published a command line interface utility to npm and github that allows you to delete keys that match a given pattern (even *) from a Redis database.

You can find the utility here:

https://www.npmjs.com/package/redis-utils-cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment