I am trying to delete multiple keys from my remote Redis db using the following command.
redis-cli -h <host> -p 6379 KEYS "myprefix:*" | xargs redis-cli -h <host> -p 6379 DEL
It has deleted all the matching keys except the ones having spaces in them.
For e.g.
Deleted:
- myprefix:abc
- myprefix:def
- myprefix:ghi
Not deleted:
- myprefix:jkl mno
- myprefix:pqr stu
- myprefix:vwx yza
What should be my query pattern so that these get deleted too? I tried googling but was unable to find any solution.