# deletePieces

> **deletePieces**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`OutputType`](/reference/filoz/synapse-core/sp/namespaces/deletepieces/type-aliases/outputtype/)\>

Defined in: [packages/synapse-core/src/sp/schedule-piece-deletion.ts:44](https://github.com/FilOzone/synapse-sdk/blob/b35b371ef603fd76d17b0f4e9e740bcdd9b7fbc3/packages/synapse-core/src/sp/schedule-piece-deletion.ts#L44)

Delete pieces from a data set on the PDP API in one transaction.

DELETE /pdp/data-sets/{dataSetId}/pieces/{pieceId}

Curio uses the first piece ID in the URL for backwards-compatible routing and
the pieceIds request field as the authoritative list when it is non-empty.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | [`OptionsType`](/reference/filoz/synapse-core/sp/namespaces/deletepieces/type-aliases/optionstype/) | [deletePieces.OptionsType](/reference/filoz/synapse-core/sp/namespaces/deletepieces/type-aliases/optionstype/) |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`OutputType`](/reference/filoz/synapse-core/sp/namespaces/deletepieces/type-aliases/outputtype/)\>

Hash of the delete operation [deletePieces.OutputType](/reference/filoz/synapse-core/sp/namespaces/deletepieces/type-aliases/outputtype/)

## Throws

Errors [deletePieces.ErrorType](/reference/filoz/synapse-core/sp/namespaces/deletepieces/type-aliases/errortype/)