Skip to main content

XDEL

Syntax

XDEL key id [id ...]

Time complexity: O(1) for each single item to delete in the stream.

ACL categories: @write, @stream, @fast

XDEL deletes entries from the given stream. The key and ids specify the stream name and entry IDs respectively. Refer to XADD referece page for more information about IDs.

Return

Integer Reply. XDEL returns the number of deleted entries.

Example

dragonfly> XADD mystream * name John
"1623910120014-0"
dragonfly> XADD mystream * name Bob
"1623910467320-0"
dragonfly> XDEL mystream 1623910120014-0 1-1
(integer) 1