In redis, how do i remove keys?

TIMEX picture TIMEX · Jan 10, 2012 · Viewed 92.6k times · Source

I want to remove keys that match "user*".

how do I do that in redis command line?

Answer

user1151446 picture user1151446 · Nov 8, 2012

Another compact one-liner I use to do what you want is:

redis-cli KEYS "user*" | xargs redis-cli DEL