Uninstall procedure

To uninstall IBM® MQ for HPE NonStop V8.1, you must follow a manual procedure.

IBM MQ can be installed into multiple locations on HPE NonStop . These instructions describe how to uninstall a single IBM MQ installation and must be repeated for any other installation that you also want to remove.

The following steps summarize the required procedure:
  1. Create the shell environment for the installation you want to remove.
  2. Gather information about the installation.
  3. Stop all applications and clients.
  4. Stop all queue managers​.
  5. Verify that all installation files are closed.
  6. Delete queue managers using dltmqm.
  7. Remove files (uninstall):
    1. Verify that all MQ files are closed​
    2. Delete installed Guardian files​.
    3. Delete installed OSS files​.
    4. Remove optional files.


The example installation has the following configuration:
  • QM1 is a queue manager running with default settings.
  • QM2 is a queue manager that uses a custom SSLKEYR path.
  • QM3 is a queue manager that uses a custom data path.
  1. Source mqprofile to set up session environment​:
    $ . <PATH_TO_OSS/MQ/ROOT>/var/mqm/mqprofile
  2. Gather information about the installation. IBM MQ V8 supports non-default paths and references for various settings, check whether any of these apply to your configuration:
    • Custom data paths for queue managers
    • custom SSLKEYR locations
    • ExitPaths
    • Deployed Guardian native and non-native samples
    • Pathway servers referencing the IBM MQ V8 installation
    • References in user profiles (even though customizing in this way is not recommended)
    For example:
    # Check varpaths of existing queue managers
      $ cat $MQINST/var/mqm/mqs.ini
      # Gather SSLKEYR locations for each queue manager:
      $ runmqsc <qmgr name>
    	MQSC > dis qmgr sslkeyr
          QMNAME(QM1)                             SSLKEYR(/home/ibm/mq8dev/var/mqm/qmgrs/QM1/ssl)
    	MQSC > dis qmgr sslkeyr
          QMNAME(QM2)                             SSLKEYR(/home/ibm/mq8sslcerts)
    	MQSC > dis qmgr sslkeyr
          QMNAME(QM3)                             SSLKEYR(/home/ibm/mq8dev/var/mqm/qmgrs/QM3/ssl)
  3. Stop all connected applications and clients​.
  4. Stop all queue managers​. Use the dspmq command to see which queue managers are running, and the endmqm command to stop them. For example:
      # get list of running queue managers
      $ dspmq
      QMNAME(QM3)                                               STATUS(Running)
      QMNAME(QM2)                                               STATUS(Ended normally)
      QMNAME(QM1)                                               STATUS(Running)
      # end running queue managers
      $ endmqm -w QM1
      Waiting for queue manager 'QM1' to end.
      IBM MQ queue manager 'QM1' ended.
      $ endmqm -w QM3
      Waiting for queue manager 'QM3' to end.
      IBM MQ queue manager 'QM3' ended.
      # verify that all queue managers are ended
      $ dspmq
      QMNAME(QM3)                                               STATUS(Ended normally)
      QMNAME(QM2)                                               STATUS(Ended normally)
      QMNAME(QM1)                                               STATUS(Ended normally)
  5. Verify that IBM MQ installation files are closed (that is, no applications are running) by using the following commands:
    $ ps -Aef | grep $MQINST
    $ kill -9 <pids>
    For example:
    # List running mq internal processes from installation
      $ ps -Aef | grep $MQINST
      MQM.MANAGER           285212978  385877951 - #zwn0258 14:37:06       00:00 grep /home/ibm/mq8ui
      MQM.MANAGER          1291850713          1 - ?        14:34:32       00:00 /home/ibm/mq8ui/opt/mqm/bin/dspmq -S -B1
      MQM.MANAGER           318768717          1 - ?        14:32:44       00:00 /home/ibm/mq8ui/opt/mqm/bin/dspmq -S -B1
      # kill them
      $ kill -9 1291850713 318768717
      # verify that none are running anymore
      $ ps -Aef | grep $MQINST
      MQM.MANAGER           385876274  385877951 - #zwn0258 14:38:08       00:00 grep /home/ibm/mq8ui
  6. Delete all queue managers by using the dltmqm command. For example:
    $ dltmqm QM1
    IBM MQ queue manager 'QM1' deleted.
    $ dltmqm QM2
    IBM MQ queue manager 'QM2' deleted.
    $ dltmqm QM3
    IBM MQ queue manager 'QM3' deleted.
  7. The product is uninstalled by deleting files. Complete the following sub-steps to delete all the required files:
    1. Verify that all IBM MQ files are closed by using the following command:
      $ gtacl -c "fup info ${MQINST_G}.*"
      For example:
      $ gtacl -c "fup info ${MQINST_G}.*"
         8OCT21 15:30 CODE             EOF      LAST MODIF   OWNER RWEP   TYPE   REC BL
         AMQBGBR       500          308496  5Oct2021 13:46  47,5   NCNC
         AMQBSUBC      500          312328  5Oct2021 13:46  47,5   NCNC
         AMQDC                    13611696  5Oct2021 13:45  47,5   NCCC
         AMQINST  O                   1033  5Oct2021 13:43  47,5   NCCC
         AMQMQINS       34A              0           14:55  47,5   NC-C   K     2512  4
         AMQPARMS O     33A+        131072           14:55  47,5   NC-C   K     6280 32
         AMQSACT       500          129328  5Oct2021 13:46  47,5   NCNC
         AMQSFHAC      500           61608  5Oct2021 13:46  47,5   NCNC
         MQMCB         500          217888  5Oct2021 13:45  47,5   NCNC
         MQMCS    O    500        23232232  5Oct2021 13:45  47,5   NCNC
         MQML          500        98577512  5Oct2021 13:45  47,5   NCNC
         MQMR          500        44549616  5Oct2021 13:45  47,5   NCNC 
    2. Delete the installed Guardian files by using the following command:​
      $ gtacl -c "fup purge ${MQINST_G}.* !"
      For example:
      $ gtacl -c "fup purge ${MQINST_G}.* !"
      186 FILES PURGED
    3. Delete the installed OSS files by using the following command:
      $ rm -r $MQINST
      For example:
      $ rm -r $MQINST
        rm: override protection 555 for /home/ibm/mq8ui/var/mqm/shared/32770/libmqzsd.so? y
        rm: override protection 555 for /home/ibm/mq8ui/var/mqm/shared/32770/libmqzsd_r.so? y
        rm: override protection 555 for /home/ibm/mq8ui/var/mqm/shared/32771/libmqzsd.so? y
        rm: override protection 555 for /home/ibm/mq8ui/var/mqm/shared/32771/libmqzsd_r.so? y
    4. Remove optional files. The dltmqm command does not remove files referenced by the queue manager's SSLKEYR attribute, and so these must be removed manually. For example, in the example installation, QM2 uses a custom SSLKEYR location:
      $ ls -l /home/ibm/mq8sslcerts/QM2
        total 0
        -rw-rw-rw-    1 MQM.MANAGER           MQM            0 Oct  7 14:01 cert.pem
        -rw-rw-rw-    1 MQM.MANAGER           MQM            0 Oct  7 14:01 stash.sth
        -rw-rw-rw-    1 MQM.MANAGER           MQM            0 Oct  7 14:01 trust.pem
      You must also manually remove non-default root directories. In the example configuration, this is the directory referenced by SSLKEYR attribute for QM2 and the data path directory used by QM3:
      $ ls -l /home/ibm/mq8datapaths/
        total 0
        $ rm -r /home/ibm/mq8sslcerts
        $ rm -r /home/ibm/mq8datapaths