5.3 Uninstalling a ZENworks Server

ZENworks includes a uninstall program (zlm-uninstall) to remove the ZENworks services, Object Store, and other files from a server. If for some reason the uninstall program cannot remove the ZENworks server software, you can manually uninstall the software. The following sections provide instructions for uninstalling the software with the uninstall program or manually.

If your ZENworks Linux Management system has Secondary Servers, you must uninstall the Secondary Servers before uninstalling the primary ZENworks server. Otherwise, during uninstallation of the Secondary Servers, you receive an error message concerning eDirectory that is not applicable because eDirectory was already removed during uninstallation of the Primary ZENworks server.

The following sections contain more information:

5.3.1 Uninstalling a Primary ZENworks Server Using zlm-uninstall

  1. Make sure you know the password for the ZENworks Administrator account.

  2. Log in to the ZENworks Server as root.

  3. Run the following command:

    /opt/novell/zenworks/bin/zlm-uninstall

  4. Follow the prompts.

5.3.2 Uninstalling a Secondary ZENworks Server By Using zlm-config

  1. Make sure you know the password for the ZENworks Administrator account.

  2. Log in to the Primary ZENworks Server as root.

  3. Run the following command:

    /opt/novell/zenworks/bin/zlm-config --remove-secondary-server=secondary_server

    where secondary_server is the name of the Secondary Server as displayed in the devices list in ZENworks Control Center.

    For example, if your server name is ZEN216, the command is:

    /opt/novell/zenworks/bin/zlm-config --remove-secondary-server=zen216

5.3.3 Manually Uninstalling a Primary or Secondary ZENworks Server

  1. Stop the services on the ZENworks Server. If necessary, see Section 5.1.3, Stopping a ZENworks Service.

  2. Remove the following directories:

    • /opt/novell/zenworks/share/keystore
    • /opt/novell/zenworks/datamodel/share/ldap-certs
    • /etc/opt/novell/zenworks/serverid
    • /etc/opt/novell/zenworks/serversecret
  3. Edit /etc/crontab to remove the lines that contain ZENworks.

  4. (Conditional) If you are removing a Secondary Server, remove the Secondary Server object from the Object Store and Data Store. To do so:

    1. Create a script file like the following one to create a CLASSPATH variable that includes all of the paths to the ZENworks classes:

      #!/bin/sh
      CLASSPATH=''
      for i in ‘ls /opt/novell/zenworks/java/lib/*.jar‘ ;
      do CLASSPATH="$i:$CLASSPATH" ;
      done ;
      for i in ‘ls /opt/novell/extend/Common/WSSKD/lib/*.jar‘ ;
      do CLASSPATH=$i:$CLASSPATH" ;
      done ;
      echo $CLASSPATH
      
    2. Use the following command to remove the ZENworks Secondary Server object:

      /opt/novell/zenworks/lib/java/bin/java -classpath $CLASSPATH com.novell.zenworks.datamodel.extensions.installer.LDAPInstaller uninstall admin_password

      Replace admin_password with the ZENworks Administrator account password.

  5. (Conditional) If you are removing the Primary Server and are using a local PostgreSQL database for the ZENworks Data Store, remove the database. To do so, use the following commands:

    /etc/init.d/postgresql start, su - postgres , dropdb zenworks , dropuser zenadmin , /etc/init.d/postgresql stop

  6. Remove the ZENworks Object Store. To do so, use the following commands:

    ndsconfig rm -F -a admin.system -w admin_passwordrm -rf /var/nds/dibrm /etc/nds.conf

    Replace admin_password with the ZENworks Administrator account password.

  7. Remove the ZENworks RPM packages and the Dell Update Packages, if necessary. To do so:

    1. Use the following command to list the package names:

      rpm -qa | grep novell-zenworks

    2. Remove each of the packages individually using the following command:

      rpm -e | package_name

      or

      Use the following simple script to remove multiple packages:

      for i in ‘rpm -qa | grep novell-zenworks‘ ; do rpm -e $i ; done
      

      Because of package dependencies, you might need to run this script multiple times to remove all packages. You can verify that all packages have been removed by running the command in Step 7.a.

  8. Remove the following directories:

    • rm -rf /opt/novell/zenworks/
    • rm -rf /etc/opt/novell/zenworks/
    • rm -rf /var/opt/novell/zenworks/