Redis

Purge redis keys in matching pattern

After logging in to linux shell execute this command

redis-cli KEYS “*$1*” | xargs redis-cli DEL

where $1 is the argument/string which you need to find.
E.g.   redis-cli KEYS “*test*” | xargs redis-cli DEL
where test is a string you need to search for.

 

You Might Also Like

  • Itamar Haber

    Be careful with KEYS near important servers (e.g. production) – do SCAN instead