---
lang: en
title: 'API docs: repository.crudrepository.deleteall'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/repository
permalink: /doc/en/lb4/apidocs.repository.crudrepository.deleteall.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [CrudRepository](./repository.crudrepository.md) &gt; [deleteAll](./repository.crudrepository.deleteall.md)

## CrudRepository.deleteAll() method

Delete matching records

<b>Signature:</b>

```typescript
deleteAll(where?: Where<T>, options?: Options): Promise<Count>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  where | [Where](./filter.where.md)<!-- -->&lt;T&gt; | Matching criteria |
|  options | [Options](./repository.options.md) | Options for the operations |

<b>Returns:</b>

Promise&lt;[Count](./repository.count.md)<!-- -->&gt;

A promise of number of records deleted


