---
title: "Prune contract data"
method: POST
path: "/bus/contract/{id}/prune"
tags: ["bus"]
---

# Prune contract data

`POST /bus/contract/{id}/prune`

Pruning a contract means that we compare the contract's sectors on the host with the contract's sectors in the database. Every sector in the contract that is not accounted for in our database will be pruned and thus deleted from the contract on the host side. This effectively removes the data from the network.

## Path parameters

- `id` string, required — A unique identifier for a file contract

## Request body

- object
  - `timeout` integer — A duration in milliseconds

## Response `200`

Contract pruned successfully

- object
  - `size` integer — The size of the pruned contract in bytes
  - `pruned` integer — The number of bytes pruned
  - `remaining` integer — The number of prunable bytes remaining
  - `error` string — An error message if the prune failed

## Other responses

- `500` — Internal server error

---

[API](https://skmtc.net/siafoundation/apis/renterd-api.md) · [All operations](https://skmtc.net/siafoundation/apis/renterd-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/siafoundation/renterd-api/revisions/184a3d5207da/schema)
