Purge a queue
Delete every message in a queue at once, waiting, delayed and in flight, and keep the queue and its settings.
Last updated 18 November 2026View as Markdown
Replace my-queue with the name of your queue.
Warning
Purged messages cannot be recovered.
Prerequisites
- Permission for
queue:PurgeQueueon the queue. Without it, the console shows Purge as unavailable. For the console, alsoqueue:GetQueueAttributeson it, to open its page.
Purge the queue
- Open the queue, then choose Danger zone (or, in the ⋯ menu, Purge messages).
- Under Purge messages, choose Purge.
- In the dialog, enter the queue's name, and choose Purge.
dcloud queue queues purge my-queuePOST /queue/api/queues/my-queue/purgeThe answer is 200 with deleted, the number of messages deleted.
Not available in Terraform. Purging is an action, not configuration.
Result
The queue is empty. Messages it had already moved to its dead-letter queue stay there; purge the dead-letter queue to delete those.
On a FIFO queue, the deduplication ids of the purged messages are kept: a send that repeats one within five minutes of the original send is still treated as a duplicate and not stored.
When the purge is refused
403withoutqueue:PurgeQueueon the queue.404"There is no queue named “my-queue” here."
Related
Did this page help you?