[rabbitmq-discuss] Deleting all queues in rabbitmq.

Emile Joubert emile at rabbitmq.com
Tue Oct 29 10:05:53 GMT 2013


On 29/10/13 04:09, k.madnani84 wrote:

> Is there any single command available which could delete all the queues in
> rabbitmq ?

There is no command to remove only the queues.

It is possible to reset the state of the entire broker to factory
settings by removing the database directory. That will remove queues,
but alot more.

You could download the broker definitions using the management plugin,
remove the queues section, reset the broker database and then upload the
modified broker definition. That should preserve all the broker settings
but cause only queues to be removed.

Another option is to list all queues using "rabbitmqctl list_queues -q
name" or "rabbitmqadmin --format=bash list queues name" and feed that
information into a program that deletes individual queues, e.g.
"rabbitmqadmin delete queue name=...". The advantage of this method is
that the broker need not be shut down.

> I read in a blog that we could do that way but my mnesia folder consist of
> lot of directories not sure which one to clear to delete all the queues.
> There was a folder "queues" in mnesia which i cleared after stopping the
> node but after restarting the node the queues came back?

Don't try to delete queues by modifying the contents of the data store
on disk.


More information about the rabbitmq-discuss mailing list