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

# prune old versions of scripts, flows, or apps

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

## Path parameters

- `workspace` string, required

## Request body

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

## Response `200`

number of pruned versions

- object
  - `pruned` integer, required

---

[API](https://skmtc.net/windmill/apis/windmill-api.md) · [All operations](https://skmtc.net/windmill/apis/windmill-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/windmill/windmill-api/versions/155a35b3caff/schema)
