If for example your redis instance disable flushall
or flushdb
# using LUA in redis-cli
eval "for _,k in ipairs(redis.call('keys','flag:*')) do redis.call('del',k) end" 0
# using shell <-- this one is better since it use scan
redis-cli --scan --pattern "*:foo:bar:*" | xargs -L 100 redis-cli DEL