The command line can be used to list existing queues:
# rabbitmqctl list_queues
And the API can be used to delete them:
curl -i -u guest:guest -H "content-type:application/json" -XDELETE http://localhost:15672/api/queues/%2F/mig.keepalive
(where %2F is the name of the vhost, here “/”) Then a simple for loop does the job:
# for queue in $(rabbitmqctl list_queues|grep ^mig|awk '{print $1}');do echo "DELETING $queue"; curl -i -u guest:guest -H "content-type:application/json" -XDELETE http://localhost:15672/api/queues/%2F/$queue;done