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

# deleteRecordZone(withID:)

Deletes a specific record zone.

## Declaration

```swift
@discardableResult func deleteRecordZone(withID zoneID: CKRecordZone.ID) async throws -> CKRecordZone.ID
```

## Parameters

- `zoneID`: The identifier of the record zone to delete.

## Return Value

Return Value The identifier of the deleted record zone.

## Discussion

Discussion warning: Deleting a record zone is a permanent action that deletes every record in that zone. You can’t restore a deleted record zone. This method throws an error if the request fails, such as when the zone does not exist on the server, the network is unavailable or the device doesn’t have an active iCloud account. For information on a more convenient way to delete record zones, see modifyRecordZones(saving:deleting:).
