---
title: "Delete Document Command"
description: "Delete documents from RavenDB using the low-level DeleteDocumentCommand with optional change vector concurrency checks."
url: "https://docs.ravendb.net/7.2/client-api/commands/documents/delete"
version: "7.2"
language: "php"
---

# Delete Document Command

> Client language: PHP. Also available for [C#](https://docs.ravendb.net/7.2/client-api/commands/documents/delete.md), [Java](https://docs.ravendb.net/7.2/client-api/commands/documents/delete.java.md), [Python](https://docs.ravendb.net/7.2/client-api/commands/documents/delete.python.md), [Node.js](https://docs.ravendb.net/7.2/client-api/commands/documents/delete.nodejs.md).
>
> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

> **Note**
>
> - Use `DeleteDocumentCommand` to remove a document from the database.
>
> - In this page:
>
>   - [Example](#example)
>   - [Syntax](#syntax)

## Example

```php
$command = new DeleteDocumentCommand("employees/1-A", null);
$session->advanced()->getRequestExecutor()->execute($command);
```

## Syntax

```php
DeleteDocumentCommand(?string $idOrCopy, ?string $changeVector = null);
```

| Parameters | Type | Description |
| - | - | - |
| **idOrCopy** | `string` | ID of a document to be deleted |
| **changeVector** | `string` (optional) | Entity Change Vector, used for concurrency checks (`None` to skip check) |

## See also

- [Get document](https://docs.ravendb.net/7.2/client-api/commands/documents/get.php.md)
- [Put document](https://docs.ravendb.net/7.2/client-api/commands/documents/put.php.md)
- [Send multiple commands using a batch](https://docs.ravendb.net/7.2/client-api/commands/batches/how-to-send-multiple-commands-using-a-batch.md)
