---
title: dict.remove() function
description: dict.remove() removes a key value pair from a dictionary and returns an updated dictionary.
url: https://docs.influxdata.com/flux/v0/stdlib/dict/remove/
estimated_tokens: 726
product: Flux
version: v0
---

# dict.remove() function

-   Flux 0.97.0+
-   View InfluxDB support

`dict.remove()` removes a key value pair from a dictionary and returns an updated dictionary.

##### Function type signature

```js
(dict: [A:B], key: A) => [A:B] where A: Comparable
```

For more information, see [Function type signatures](/flux/v0/function-type-signatures/).

## Parameters

### dict

(Required) Dictionary to remove the key-value pair from.

### key

(Required) Key to remove from the dictionary. Must be the same type as existing keys in the dictionary.

## Examples

### Remove a property from a dictionary

```js
import "dict"

d = [1: "foo", 2: "bar"]

dict.remove(dict: d, key: 1)// Returns [2: "bar"]

```

#### Related

-   [Work with dictionaries](/flux/v0/data-types/composite/dict/)
