# RedisQueue.clear() method · @imqueue/core

Source: https://imqueue.org/api/core/latest/core.redisqueue.clear/
Published: 2026-08-04
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/core 3.3.2 — generated reference, not hand-written

Deletes this queue's message list and its delayed-message set from redis.

**Signature:**

```typescript
clear(): Promise<RedisQueue>;
```
**Returns:**

Promise<[RedisQueue](https://imqueue.org/api/core/latest/core.redisqueue/)>

this queue instance

## Remarks

A no-op that resolves successfully when the queue has no writer connection. In-flight messages held in worker keys under [IMQOptions.safeDelivery](https://imqueue.org/api/core/latest/core.imqoptions.safedelivery/) are not removed and may be re-queued by the watcher after their lease expires, so this does not guarantee the queue stays empty. Errors are logged rather than thrown, so success cannot be inferred from a resolved promise.

