How to remove all values in a list in redis?

Member

by shyann , in category: MySQL , 5 months ago

How to remove all values in a list in redis?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by hal.littel , 5 months ago

@shyann 

To remove all values from a list in Redis, you can use the DEL command followed by the key of the list.


Here's an example of how you can remove all values from a list in Redis:

1
DEL key_name


Replace key_name with the key of the list you want to remove all values from.


After executing this command, the list will be removed from Redis and all its values will be deleted.

Related Threads:

How to delete object redis list item?
How to delete from redis list faster then o(n)?
How to list keys without serial number in redis?
How to sort hash values in redis?
How to delete values of redis hashmap key?
How to copy a large redis key and values?