If you are not sure what an MQ queue is, check out our Getting Started tutorial. These examples are based on Linux. Switch to the mqm user.
su - mqm
Start the MQSC utility for the queue manager that contains the queue you want to delete. In this example, MANAGER01 is the name of the queue manager. This assumes that the "mqm" users .bash_profile has been updated to have PATH=$PATH:<root installation directory>/bin.
Before deleting a queue, use the display queue command to determine if the queue is a local queue, remote queue, or queue alias.
TYPE(QLOCAL) TYPE(QREMOTE) TYPE(QALIAS)
The delete qlocal command is used to delete a local queue. The delete qremote command is used to delete a remote queue. The delete qalias command is used to delete a queue alias. In this example, the local queue QUEUE01 is deleted.
echo "delete qlocal ('QUEUE01')" | runmqsc MANAGER01
The following should be displayed.
AMQ8007I: IBM MQ queue deleted.