# Delete a Version

Deleting a dataset version moves it to your workspace [Trash](/workspaces/trash.md) for 30 days before it is permanently removed. You can restore it from the Trash any time during the retention window.

Any in-flight training for the version is cancelled automatically when you move it to Trash. The trained model for the deleted version stops serving until the version is restored.

{% hint style="info" %}
If you have hit your generated image quota, moving a version to Trash does not immediately free up your usage. Generated images are reclaimed when the version is permanently deleted (either after the 30-day retention window or manually from the Trash).
{% endhint %}

## Delete a version

1. Open the project's Versions page and select the version you want to delete.
2. Click "Edit Dataset" and then "Delete Version".
3. Type the version name to confirm.
4. Click "Move to Trash".

<figure><img src="/files/udkbKbBaIXiTtmOUsysQ" alt=""><figcaption></figcaption></figure>

## Restore or permanently delete

See [Trash](/workspaces/trash.md) for how to restore a deleted version or remove one immediately without waiting for the 30-day retention window. The version's parent project must be active (not itself in Trash) to restore.

## Delete via API, SDK, or CLI

You can also move a version to Trash through:

* REST API: `DELETE /:workspace/:project/:version`
* Python SDK: `version.delete()`
* CLI: `roboflow version delete <workspace>/<project>/<version>`

To restore outside the web app use `version.restore()` from the SDK or `roboflow version restore <workspace>/<project>/<version>` from the CLI.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/datasets/dataset-versions/delete-a-version.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
