---
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: 186
product: Flux
version: v0
publisher: InfluxData
canonical: https://docs.influxdata.com/flux/v0/stdlib/dict/remove/
date: '2024-04-08T16:01:02-06:00'
lastmod: '2024-04-08T16:01:02-06:00'
---

* Flux 0.97.0+

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

```
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/)
