---
name: "lremove"
section: "3tcl"
platform: "linux"
package: "tcl9.0-doc"
version: "9.0.1+dfsg-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://carta.tech/man/lremove"
---

# lremove(3tcl)

Remove elements from a list by index

```

```

## NAME

lremove - Remove elements from a list by index

## SYNOPSIS

**lremove** *list* ?*index ...*?

```

```

## DESCRIPTION

**lremove** returns a new list formed by simultaneously removing zero or more elements of *list* at each of the indices given by an arbitrary number of *index* arguments. The indices may be in any order and may be repeated; the element at index will only be removed once.  The index values are interpreted the same as index values for the command **string index**, supporting simple index arithmetic and indices relative to the end of the list.  0 refers to the first element of the list, and **end** refers to the last element of the list.

## EXAMPLES

Removing the third element of a list:

```
% lremove {a b c d e} 2
a b d e
```

Removing two elements from a list:

```
% lremove {a b c d e} end-1 1
a c e
```

Removing the same element indicated in two different ways:

```
% lremove {a b c d e} 2 end-2
a b d e
```

## SEE ALSO

[list(3tcl)](/man/list/3tcl.md), [lappend(3tcl)](/man/lappend/3tcl.md), [lassign(3tcl)](/man/lassign/3tcl.md), [ledit(3tcl)](/man/ledit/3tcl.md), [lindex(3tcl)](/man/lindex/3tcl.md), [linsert(3tcl)](/man/linsert/3tcl.md), [llength(3tcl)](/man/llength/3tcl.md), [lmap(3tcl)](/man/lmap/3tcl.md), [lpop(3tcl)](/man/lpop/3tcl.md), [lrange(3tcl)](/man/lrange/3tcl.md), [lrepeat(3tcl)](/man/lrepeat/3tcl.md), [lreplace(3tcl)](/man/lreplace/3tcl.md), [lreverse(3tcl)](/man/lreverse/3tcl.md), [lsearch(3tcl)](/man/lsearch/3tcl.md), [lseq(3tcl)](/man/lseq/3tcl.md), [lset(3tcl)](/man/lset/3tcl.md), [lsort(3tcl)](/man/lsort/3tcl.md)

## KEYWORDS

element, list, remove
