Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdataprime%2Flanguage-reference%2Fcommands-reference%2Fremove.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdataprime%2Flanguage-reference%2Fcommands-reference%2Fremove.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# `remove`

## Description

The `remove` command deletes one or more keypaths from every document in the working set. It is the inverse of `choose`, which keeps only the specified fields.

This is especially useful for sanitizing logs or removing fields containing unnecessary or sensitive information before performing analysis.

Note

`remove` can operate on scalar values or entire objects.

## Syntax

```
'r|remove <keypath1> [ "," <keypath2> ]...'
```

## Example

**Use case: Remove personal data from logs**

Suppose your dataset includes user information, and you need to remove the `email` field for privacy reasons before further processing.

### Example data

```
{

    "username": "chris",

    "email": "chris@coralogix.com",

    "location": "UK",

    "domain": "chris.com"

}
```

### Example query

```
remove email
```

### Example output

```
{

    "username": "chris",

    "location": "UK",

    "domain": "chris.com"

}
```

The `remove` command eliminates the `email` keypath and its value from each document, leaving all other fields intact.
