Keep the stream approximately within a max length.
Section: Streams
Trim a stream
bash
bash
XTRIM orders MAXLEN ~ 10000Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Streams
Append an entry to a stream
Write a new stream message with autogenerated ID.
Read from one or more streams
Block and read new entries from multiple streams.
Create a consumer group
Create a consumer group, creating the stream if missing.