Skip to content

Instantly share code, notes, and snippets.

@adrianoxavier
Created June 22, 2013 01:33
Show Gist options
  • Save adrianoxavier/5835457 to your computer and use it in GitHub Desktop.
Save adrianoxavier/5835457 to your computer and use it in GitHub Desktop.
Remove keys from Redis by pattern
for key in `redis-cli "KEYS" "app:scope:*" | awk '{print $1}'`
do redis-cli "DEL" "$key"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment