---
title: 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.
url: https://coralogix.com/docs/dataprime/language-reference/commands-reference/remove/
product: dataengine
feature: DataPrime Language
feature_id: dataprime-language
feature_identifier: dataengine/dataprime-language
last_updated: '2026-10-21'
---

# `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.
