Skip to content

Instantly share code, notes, and snippets.

@mjallday
Created November 21, 2013 22:04
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mjallday/7590598 to your computer and use it in GitHub Desktop.
Save mjallday/7590598 to your computer and use it in GitHub Desktop.
purge all rabbitmq queues
rabbitmqadmin list queues | cut -d '|' -f 3 | grep -v \+ | xargs -n1 -I@ rabbitmqadmin purge queue name=@
@lucaswxp
Copy link

lucaswxp commented Nov 6, 2018

I guess my rabbitmqadmin version is different, the following did it for me:

rabbitmqadmin list queues | cut -d '|' -f 2 | sed -e 's/ //g' | xargs -n1 -I@ rabbitmqadmin purge queue name=@

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment