How does one flush an entry from redis?

Peter Russel jpgpi250 at
Sat Dec 17 09:55:43 UTC 2022

Certainly NOT the best solution, but it works (emergencies)

My redis database contains only 1213 entries, so the processing time is

I use a bash script (commented out the line that actually deletes the
entry, dry run before you uncomment that line).


mapfile -t keysArray < <(redis-cli --scan)

for (( i=0; i<${#keysArray[@]}; i++ )); do

   data=$(echo "dump ${keysArray[i]}" | redis-cli | tr -d '\0')

   if [[ "${data}" == *"accounts"*"google"*"com"* ]]; then

      echo "${keysArray[i]}"

      # redis-cli del "${keysArray[i]}"



In order to look at the redis database, I use a web interface (

My install script for this (into /var/www/html), using lighttpd


sudo apt-get -y install libtool

sudo apt-get -y install php7.4-dev

sudo apt-get -y install php-redis

sudo apt-get -y install php-mbstring

cd /var/www/html

sudo git clone

cd phpRedisAdmin

sudo git clone vendor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Unbound-users mailing list