---
url: /process-functions/element-delete.md
description: Deletes an element from a dimension and from every hierarchy it's in.
---

# element.delete

Deletes an element from a dimension and from every hierarchy it's in.

```js
element.delete(dimension, name)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `dimension` | `string` | The dimension's name or id. |
| `name` | `string` | The element's name. |

## Returns

An empty string when it succeeds, or an error message when the dimension can't be found. Deleting an element that doesn't exist isn't an error.

::: warning
The old values aren't cleared from memory until the cube is next loaded from disk, for example after a server restart. If an element with the same name is created again before then, its old values come back with it.

That makes an accidental delete recoverable by recreating the element within that time window.
:::

## Examples

```js
element.delete("Account", "600010");
```
