<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [git-documentdb](./git-documentdb.md) &gt; [GitDocumentDB](./git-documentdb.gitdocumentdb.md) &gt; [remove](./git-documentdb.gitdocumentdb.remove.md)

## GitDocumentDB.remove() method

Remove a document

<b>Signature:</b>

```typescript
remove(id: string, options?: RemoveOptions): Promise<RemoveResult>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  id | string | id of a target document |
|  options | [RemoveOptions](./git-documentdb.removeoptions.md) |  |

<b>Returns:</b>

Promise&lt;[RemoveResult](./git-documentdb.removeresult.md)<!-- -->&gt;

## Exceptions

[DatabaseClosingError](./git-documentdb.databaseclosingerror.md)

[RepositoryNotOpenError](./git-documentdb.repositorynotopenerror.md)

[UndefinedDocumentIdError](./git-documentdb.undefineddocumentiderror.md)

[DocumentNotFoundError](./git-documentdb.documentnotfounderror.md) when the specified document does not exist.

[CannotDeleteDataError](./git-documentdb.cannotdeletedataerror.md)

[InvalidIdCharacterError](./git-documentdb.invalididcharactererror.md)

[InvalidIdLengthError](./git-documentdb.invalididlengtherror.md)

