# unset

Learn how to delete the key and value at a given path.

This method chains an `unset` operation to the patch, which deletes a key and value at a specified path.

The difference between [`clear`](clear) and `unset` is that `clear` clears the value preserving the path, while `unset` deletes the path.

> **Fail-safe operation**
>
> This operation does not fail if the path does not exist.

## Signature

This method has the following signature:

```ts
patch.unset(path: string): Patch
```

The return is the `Patch` instance itself to allow operation chaining.

## Example

Here is a basic example of how to use this method:

```ts
patch.unset('preferences.color');
```

## Parameters

The following list describes the supported parameters:

- `path`: `string`

  The path to the value to unset in dot notation, like `address.city`.
