How do I delete all messages from a single queue using the CLI?

Bick picture Bick · Mar 15, 2011 · Viewed 159.6k times · Source

How do I delete all messages from a single queue using the cli? I have the queue name and I want to clean it.

Answer

Anurag jain picture Anurag jain · Dec 29, 2015

you can directly run this command

sudo rabbitmqctl purge_queue queue_name