Skip to content

Instantly share code, notes, and snippets.

@thedevsaddam
Forked from mattweyant/redis-delallbykey
Created August 20, 2016 12:54
Show Gist options
  • Save thedevsaddam/4206b59b7967f21de20747fc211c5ab0 to your computer and use it in GitHub Desktop.
Save thedevsaddam/4206b59b7967f21de20747fc211c5ab0 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