---
title: "deleteRecord(withID:)"
framework: cloudkit
role: symbol
role_heading: Instance Method
path: "cloudkit/ckdatabase/deleterecord(withid:)"
---

# deleteRecord(withID:)

Deletes a specific record.

## Declaration

```swift
@discardableResult func deleteRecord(withID recordID: CKRecord.ID) async throws -> CKRecord.ID
```

## Parameters

- `recordID`: The identifier of the record to delete.

## Return Value

Return Value The identifier of the deleted record.

## Discussion

Discussion Deleting a record may cause additional deletions if other records in the database reference the deleted record. CloudKit doesn’t provide the identifiers of any additional records it deletes. This method throws an error if the request fails, such as when the records doesn’t exist, the network is unavailable or the device doesn’t have an active iCloud account. For information on a more convenient way to delete records, see modifyRecords(saving:deleting:savePolicy:atomically:).
