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

```dataprime
'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

```json
{
    "username": "chris",
    "email": "chris@coralogix.com",
    "location": "UK",
    "domain": "chris.com"
}
```

### Example query

```dataprime
remove email
```

### Example output

```json
{
    "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.
