In order to delete only messages from the queue use :
sudo rabbitmqctl --node <nodename> purge_queue <queue_name>
In order to delete a queue which is empty(--if-empty) or has no consumers(--if-unused) use :
sudo rabbitmqctl --node <nodename> delete_queue <queue_name> --if-empty
or
sudo rabbitmqctl --node <nodename> delete_queue <queue_name> --if-unused