<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "CloudKitJS",
  "identifier" : "/documentation/CloudKitJS/CloudKit.Database/deleteRecords",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CloudKit JS"
    ],
    "preciseIdentifier" : "instm/CloudKit.Database/deleteRecords"
  },
  "title" : "deleteRecords"
}
-->

# deleteRecords

Deletes one or more records.

```
Promise<CloudKit.RecordsResponse, CloudKit.CKError> deleteRecords(
	CloudKit.Record|CloudKit.Record[]|String|String[] records,
	optional Object options
);
```

## Parameters

`records`

Possible values are:
    
    |Type                                                                   |Description                                             |
    |-----------------------------------------------------------------------|--------------------------------------------------------|
    |``doc://com.apple.cloudkitjs/documentation/CloudKitJS/CloudKit.Record``|A dictionary or the record name of the record to delete.|
    |`CloudKit.Record[]`                                                    |An array of records to delete.                          |
    |`String`                                                               |The name of a record to delete.                         |
    |`String[]`                                                             |An array of names of records to delete.                 |

`options`

A dictionary containing a single `zoneID` key that identifies the zone ([`CloudKit.ZoneID`](/documentation/CloudKitJS/CloudKit.ZoneID)) in the database where the record resides. If the `options` parameter is omitted, the default zone is used.

## Return Value

A `Promise` object that resolves to a [`CloudKit.RecordsResponse`](/documentation/CloudKitJS/CloudKit.RecordsResponse) object if the operation succeeds; otherwise, a [`CKError`](/documentation/CloudKitJS/CloudKit/CKError) object.

---

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)