> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Vacuum dataset

> Removes field definitions absent from retained data.

`axiom.vacuumDataset` queues removal of field definitions absent from retained data. It does not delete retained events and returns `null` after Axiom accepts the request.

```ts automations/axiom-vacuum-dataset.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { axiom } from "automate.ax/axiom"

export default automation("Vacuum dataset", () => {
  onHttpRequest({ scope: "automation" })
  axiom.vacuumDataset({ datasetName: "production" })
})
```

<Warning>
  This operation changes or deletes provider data. Confirm the target before
  deployment.
</Warning>

## Inputs

`datasetName` is required and accepts the dataset name or ID to vacuum.

## Output

Returns `null` after Axiom queues the vacuum request. A successful response does not mean vacuuming is complete; processing can take several hours.

## Permission and failures

The API token needs the dataset-level `vacuum|update` capability for the target dataset. Axiom can return `429` when too many vacuum requests are in progress. Missing or inaccessible datasets also fail, and the mutation is not retried automatically after an ambiguous provider response.
