Uninstalling or modifying IBM MQ on AIX

On AIX , we can uninstall the IBM MQ server or client using the System Management Interface Tool (SMIT) or the installp command. We can also modify an installation by uninstalling a subset of the file sets.


Before you begin

If any updates have been applied, remove them before starting the uninstallation or modification procedure. For more information, see Reverting to the previous maintenance level on AIX. Important: You must stop all IBM MQ queue managers, other objects, and applications, before you begin the process to uninstall or modify IBM MQ.


Procedure

  1. Stop all IBM MQ applications associated with the installation you are uninstalling or modifying, if we have not already done so.
  2. For a server installation, end any IBM MQ activity associated with the installation you are uninstalling or modifying:
    1. Log in as a user in the group mqm.
    2. Set up your environment to work with the installation you want to uninstall or modify. Enter the following command:
      . MQ_INSTALLATION_PATH/bin/setmqenv
      
      where MQ_INSTALLATION_PATH refers to the location where IBM MQ is installed.
    3. Display the state of all queue managers on the system. Enter the following command:
      dspmq -o installation
      
    4. Stop all running queue managers associated with the installation you want to uninstall or modify. Enter the following command for each queue manager:
      endmqm QMgrName
      
    5. Stop any listeners associated with the queue managers. Enter the following command for each queue manager:
      endmqlsr -m QMgrName
      
  3. Log in as root.
  4. Uninstall or modify IBM MQ using either installp or smit. If IBM MQ was installed in a non-default location, you must use installp.

    • To uninstall or modify IBM MQ by using installp, enter one of the following commands:

      • To uninstall an installation in the default location /usr/mqm:
        installp -u mqm
        
      • To uninstall an installation in a non-default location:
        installp -R usil -u mqm
        
        where usil is the path of the User Specified Installation Location (USIL) specified when the product was installed.
      • To modify an installation in a non-default location:
        installp -R usil -u list of file sets
        where usil is the path of the User Specified Installation Location (USIL) specified when the product was installed.
    • To uninstall or modify IBM MQ by using smit, complete the following steps:
      1. Select the required smit window using the following sequence:
        Software Installation and Maintenance
        Software Maintenance and Utilities
        Remove Installed Software
        
      2. List the software in the SOFTWARE name field:
        1. Enter .
        2. Press F4
      3. Select the file sets to uninstall from the list (those beginning with mqm):

        • For a complete uninstall, select all file sets.
        • To modify the installation, select a subset of the file sets.
        After selecting the file sets, press Enter. There is an option at this stage to do a preview. Leave the option set to the default value of Yes to preview the file sets you are uninstalling, or select No to not preview these file sets.
      4. Press Enter on the Remove Installed Software panel, it asks whether you are sure, press Enter.


Results

After uninstallation, certain files under the directory trees /var/mqm and /etc/opt/mqm are not removed. These files contain user data and remain so subsequent installations can reuse the data. Most of the remaining files contain text, such as INI files, error logs, and FDC files. The directory tree /var/mqm/shared contains files that are shared across installations, including the executable shared libraries libmqzsd.a and libmqzsd_r.a.


What to do next

  • If the product successfully uninstalled, we can delete any files and directories contained in the /usr/mqm directory under the User Specified Installation Location (USIL) specified in the installp uninstallation command.
  • Use the lslpp command to check for other products installed in the USIL. If there are no other products installed in the USIL and we do not intend to use it again, we can delete the USIL using the rmusil command.
  • If there are no other IBM MQ installations on the system, and you are not planning to reinstall or migrate, we can delete the /var/mqm and /etc/opt/mqm directory trees, including the files libmqzsd.a and libmqzsd_r.a. Deleting these directories destroys all queue managers and their associated data.