Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lbecket's avatar
Level 39

Can't Delete Redis Key

I'm having some trouble with what seems to be a very basic Redis command. I can create a key, read the key value, but then I get an error when attempting to delete the key:

127.0.0.1:6379> SET testKey "test value"
OK
127.0.0.1:6379> GET testKey
"test value"
127.0.0.1:6379> DEL testKey
(error) ERR unknown command `DEL`, with args beginning with: `testKey`, 

Has anyone encountered this before or have some sense of why the DEL command seems to be missing?

0 likes
1 reply
lbecket's avatar
lbecket
OP
Best Answer
Level 39

User error... I forgot that when I set redis up I renamed the DEL command. Geesh... it's only been a couple of years, you'd think I'd have remembered that 🙄

Please or to participate in this conversation.