---
title: "prune old versions of scripts, flows, apps, or resources"
method: POST
path: "/w/{workspace}/workspaces/prune_versions"
tags: ["workspace"]
---

# prune old versions of scripts, flows, apps, or resources

`POST /w/{workspace}/workspaces/prune_versions`

## Path parameters

- `workspace` string, required

## Request body

- object
  - `resource_type` 'scripts' | 'flows' | 'apps' | 'resources', required

## Response `200`

number of pruned versions

- object
  - `pruned` integer, required

## Changes

> 176 revisions in range; 4 could not be searched.

- **2026-08-10** `85ef56aed504` — 1 info
  - added the new `resources` enum value to the request property `resource_type`

[Change history](https://skmtc.dev/windmill/apis/windmill-api/changes/w/:workspace/workspaces/prune_versions/post.md)

---

[API](https://skmtc.dev/windmill/apis/windmill-api.md) · [All operations](https://skmtc.dev/windmill/apis/windmill-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/windmill/windmill-api/revisions/7b281701c340/schema)
