Delete all keys from Redis matching a regular expression In redis, how do i remove keys? vi testKeyDelRedis.sh for key in `echo 'KEYS user:*' | redis-cli | awk '{print $1}'` do echo DEL $key done | redis-cli # 실행권한, 실행 chmod +x testKeyDelRedis.sh ./testKeyDelRedis.sh redis-cli keys "user:*" | grep "user:[0-9]\+$" | xargs redis-cli DEL