Skip to content
masterclass Buddy

Redis · Command

LTRIM

Trims a Redis list to an inclusive index range. It supports zero-based and negative indexes, and deletes the key when the resulting list is empty.

Last updated

Since
1.0.0

Syntax

LTRIM key start stop

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • BLMOVE
  • BLMPOP
  • BLPOP
  • BRPOP
  • LINDEX
  • LINSERT
  • LLEN
  • LMOVE

Source: LTRIM | Docs. Checked 2026-11-03.