---
title: "Delete a batch of objects with a given prefix"
method: POST
path: "/worker/objects/remove"
tags: ["worker"]
---

# Delete a batch of objects with a given prefix

`POST /worker/objects/remove`

Deletes all objects with the provided prefix from the database. The data is not removed from the network immediately. Instead, the autopilot prunes data from the contracts periodically, after that happens the host is no longer obliged to store the data and it's effectively removed from the network.

## Request body

- object
  - `bucket` string — The name of the bucket the objects belong to
  - `prefix` string — The prefix of the objects to delete

## Response `200`

Successfully removed objects

## Other responses

- `400` — Malformed request
- `404` — Object not found
- `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)
