<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKDatabase/deleteRecordZone(withID:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:So10CKDatabaseC8CloudKitE16deleteRecordZone6withIDSo08CKRecordfH0CAG_tYaKF"
  },
  "title" : "deleteRecordZone(withID:)"
}
-->

# deleteRecordZone(withID:)

Deletes a specific record zone.

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

## Parameters

`zoneID`

The identifier of the record zone to delete.

## Return Value

The identifier of the deleted record zone.

## 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:)`](/documentation/CloudKit/CKDatabase/modifyRecordZones(saving:deleting:)).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)