---
url: /technical/how-to-remove-data-from-a-cube.md
---
# How to remove unused data from a cube

Data that no longer needs to be stored in MODLR can be removed either by wiping the cells, or by permanently removing the populated element from the dimension.

## Removing the element from the dimension

In the scenario dimension below, any data stored against the **Budget** scenario can be removed from the model by completing the following steps:

![scenario dimension](/scenario-dimension.png)

1. Remove the element from the hierarchy and click "Save".

![scenario dimension with element removed](/scenario-dimension-element-removed.png)

2. Click **Audit Dimension**.
   ::: info

If the element is contained in any hierarchies, it will not appear when auditing the dimension. **Audit Dimension** shows any elements that do not exist in hierarchies within the dimension - these are called **orphaned elements**. The same check is available from a Process via [`dimension.audit`](/process-functions/dimension-audit.html).
:::

![scenario dimension audit and remove orphans](/scenario-dimension-audit-dimension-remove-orphans.png)

3. Click **Remove Orphans**.
4. [Restart the server](how-to-restart-a-server). This is required to clear the cell paths/locations from memory.

::: warning
This is a two-stage, and until step 4, reversible operation. Clicking **Remove Orphans** removes the element from the dimension's element list immediately, but the data that was stored against it is **not** deleted at that point - it stays in cube storage until the server is restarted. That means if an element was removed by mistake, re-adding it to a hierarchy before restarting the server brings its data straight back, untouched. Only once the server actually restarts is that data permanently dropped and unrecoverable. Don't restart the server as step 4 until you're confident the removal was correct.
:::

## Wiping the cells

If a cell is not fed by a formula, it can be wiped by:

* Setting the value in a number cell to `0` or empty string
* Setting the value in a string cell to empty string
* Using the [cube.wipe process function](/process-functions/cube-wipe)
* Using the [dataspreading /clear](dataspreading-clear)
