How to Delete all the queues from RabbitMQ?¶
1. Using Policies - Management Console¶
- Go to Management Console
- Click on Admin tab
- Policies tab (on the right side)
- Add Policy
- Fill Fields
- Virtual Host: Select (Default is /hyperion)
- Name: Expire All Policies(Delete Later)
- Pattern: .*
- Apply to: Queues
- Definition: expires with value 1 (change type from String to Number)
- Click on
Add / update policy
- Checkout Queues tab again, all queues must be deleted.
You must remove this policy after this operation.
2. Using command line¶
First, list your queues:
Then from the list, you'll need to manually delete them one by one:
rabbitmqadmin list queues name
Because of the output format, doesn't appear you can grep the response from
rabbitmqadmin delete queue name='queuename'
Be sure you really want to do this! This gonna reset all your rabbitMQ configuration, and return it to the default state.