Copy as Markdown[View as Markdown](/docs/sdk/functions/rmCustomDoc.md)

***

# Function: rmCustomDoc()

> **rmCustomDoc**(`directory`): (`filePath`) => `Promise`<`void`>

Defined in: custom-docs.ts:123

Delete a custom doc by its' path

## Parameters[​](#parameters "Direct link to Parameters")

| Parameter   | Type     |
| ----------- | -------- |
| `directory` | `string` |

## Returns[​](#returns "Direct link to Returns")

`Function`

### Parameters[​](#parameters-1 "Direct link to Parameters")

| Parameter  | Type     |
| ---------- | -------- |
| `filePath` | `string` |

### Returns[​](#returns-1 "Direct link to Returns")

`Promise`<`void`>

## Example[​](#example "Direct link to Example")

```
import utils from '@eventcatalog/utils';

const { rmCustomDoc } = utils('/path/to/eventcatalog');

// removes a custom doc at the given path
// Removes the custom doc at docs/guides/inventory-management/introduction.mdx
await rmCustomDoc('/guides/inventory-management/introduction');
```
