Skip to content

Instantly share code, notes, and snippets.

@2bj
Forked from mattweyant/redis-delallbykey
Created November 3, 2015 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 2bj/493e9c853694c4e43db4 to your computer and use it in GitHub Desktop.
Save 2bj/493e9c853694c4e43db4 to your computer and use it in GitHub Desktop.
Delete all keys from Redis matching a regular expression
# All credit: http://stackoverflow.com/questions/4006324/how-to-atomically-delete-keys-matching-a-pattern-with-redis
redis-cli [options] KEYS "prefix:*" | xargs redis-cli [options] DEL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment