lremove(n) Tcl Built-In Commands lremove(n)

```

```

# [NAME](#NAME)

lremove - Remove elements from a list by index

# [SYNOPSIS](#SYNOPSIS)

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

```

```

# [DESCRIPTION](#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](#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](#SEE_ALSO)

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

# [KEYWORDS](#KEYWORDS)

element, list, remove

9.0 Tcl

---

Document: lremove(n) from tcl 9.1.0-r1 (Chainguard OS)
Source: https://downloads.sourceforge.net/project/tcl/Tcl/9.1.0/tcl9.1.0-src.tar.gz
