5 Replies Latest reply on Feb 7, 2013 3:46 PM by Snowman

    Uninstall LANDesk on a Mac

    Rookie

      I have been running into some issues running the shell script to remove LANDesk from our Macs.  Before I go in and start tearing the script apart, I'm wondering if anyone has an updated version of the script or has seen these issues on their machines. 

       

      $ sudo ./uninstallmacagent.sh

      Password:

      launchctl: Error unloading: com.landesk.ldusermenu

      kill: 36746: No such process

      No matching processes were found

      No matching processes were found

      Warning the firewall must be restarted

      removing LaunchDaemon:

      removing rc files

      removing LaunchDaemon:

      removing LANDesk link: common/ldgidget

      removing LANDesk link: common/ldkahuna

      removing LANDesk link: common/sdclient

      Removing receipt database entry for: baseagent

      No receipt for 'baseagent' found at '/'.

      removing LANDesk file: common/alertsync

      removing LANDesk file: common/brokerconfig

      removing LANDesk file: common/pds2_uninstall.sh

      removing LANDesk file: common/pds2d

      removing LANDesk file: common/pds2dis

      removing LANDesk file: common/poweroff.exe

      removing LANDesk file: common/uniqueid

      removing LaunchDaemon:

      removing Preference:

      removing launch daemon:

      removing Application Support directory: LANDesk

      Removing agent framework

      Checking LANDeskAgent.framework

      ./uninstallmacagent.sh: line 227: /Library/StartupItems/cba8/cba8: Permission denied

      removing launch daemon: LANDeskAgent.framework

      removing LaunchDaemon: LANDeskAgent.framework

      removing LaunchDaemon: LANDeskAgent.framework

      removing LaunchDaemon: LANDeskAgent.framework

      removing LaunchDaemon: LANDeskAgent.framework

      removing LaunchDaemon: LANDeskAgent.framework

      removing LaunchDaemon: LANDeskAgent.framework

      removing LaunchDaemon: LANDeskAgent.framework

      removing LaunchAgent: LANDeskAgent.framework

      removing LaunchAgent: LANDeskAgent.framework

      removing LaunchAgent: LANDeskAgent.framework

      removing LaunchAgent: LANDeskAgent.framework

      removing SharedTech:

      removing LANDesk file: common/addhandler

      removing LANDesk file: common/makekey

      removing LANDesk file: common/shutdownhandler.sh

      removing LANDesk file: common/reboothandler.sh

      removing LANDesk file: common/cba8_uninstall.sh

      removing LANDesk file: common/alert

      removing LANDesk file: common/resetguard

      removing LANDesk file: common/cba

      removing LANDesk file: common/proxyhost

      removing LANDesk file: common/ldpgp

      removing LANDesk file: common/alertrender

      removing LANDesk file: common/httpclient

      removing LANDesk file: common/cbaroot/certs/064eb6a5.0

      removing LANDesk file: common/cbaroot/allowed/cba8.crt

      removing LANDesk file: common/cbaroot/allowed/logodk.gif

      removing LANDesk file: common/cbaroot/allowed/hdr_lsdk.gif

      removing LANDesk file: common/cbaroot/allowed/ldping

      removing LANDesk file: common/cbaroot/services/filexfer

      removing LANDesk file: common/cbaroot/services/exec

      removing LANDesk file: common/cbaroot/alert/alert.xml

      ./uninstallmacagent.sh: line 262: cd: /opt/landesk/: No such file or directory

      ls: common/*strings.xml: No such file or directory

      removing LANDesk directory: common/cbaroot

      No matching processes were found

      Removing receipt database entry for: com.landesk.agent.sharedtech

      Forgot package 'com.landesk.agent.sharedtech' on '/'.

      Removing receipt database entry for: com.landesk.agent.swd

      Forgot package 'com.landesk.agent.swd' on '/'.

      Removing receipt database entry for: com.landesk.agent.vulscan

      Forgot package 'com.landesk.agent.vulscan' on '/'.

      Removing receipt database entry for: com.landesk.agent.brokerconfig

      Forgot package 'com.landesk.agent.brokerconfig' on '/'.

      Removing receipt database entry for: com.landesk.agent.ldusermenu

      Forgot package 'com.landesk.agent.ldusermenu' on '/'.

      Warning the firewall must be restarted

      Attempting to remove directory structure...

      rmdir: /usr/LANdesk/common: Directory not empty

      rmdir: /usr/LANDesk: Directory not empty

      Uninstaller: Uninstalling Tiger or later items

      delete: Invalid Path

      <dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)

      removing services entries

      removing inet entries

      cp: /etc/inetd.conf: No such file or directory

      sed: /etc/inetd.conf.bak: No such file or directory

      rm: /etc/inetd.conf.bak: No such file or directory

      restarting xinetd

      sudo: xinetd: command not found

      2013-02-07 11:05:09.757 defaults[41098:903]

      There is no (CatalogURL) default for the (com.apple.SoftwareUpdate) domain.

      Defaults have not been changed.

      Cleanup complete: 49 elements were removed.

       

      I'm successfully removing the software, but with all the errors, it's reporting back a failure. 

        • 1. Re: Uninstall LANDesk on a Mac
          SupportEmployee

          What version of LDMS are you using?

          Are you running the script manually?

          • 2. Re: Uninstall LANDesk on a Mac
            Rookie

            Version 9 of LANDesk.

             

            I've tried running it through AppleRemote Desktop, Casper, and manually. 

             

            We'd run it thorugh LANDesk, but we need someway to report a successful removal which is why we are trying with the other methods.  All three of the methods above are showing the same problems when we run the removal script.

            Here's the Casper attempt:

             

            /usr/sbin/jamf is version 8.62
            Executing Policy Uninstall LANDesk...
            Mounting SHARE
            Running script uninstallmacagent.sh...
            Script exit code: 0
            Script result: launchctl: Error unloading: com.landesk.broker
            launchctl: Error unloading: com.landesk.cba8
            launchctl: Error unloading: com.landesk.turner
            launchctl: Error unloading: com.landesk.watch
            launchctl: Error unloading: com.landesk.msgsys
            launchctl: Error unloading: com.landesk.pds
            launchctl: Error unloading: com.landesk.pds2
            launchctl: Error unloading: com.landesk.remote
            launchctl: Error unloading: com.landesk.logrotate
            No matching processes were found
            No matching processes were found
            No matching processes were found
            No matching processes were found
            No matching processes were found
            Warning the firewall must be restarted
            removing LaunchDaemon:
            removing rc files
            removing LaunchDaemon:
            removing LANDesk link: common/ldgidget
            removing LANDesk link: common/ldkahuna
            removing LANDesk link: common/sdclient
            Removing receipt database entry for: baseagent
            No receipt for 'baseagent' found at '/'.
            removing LANDesk file: common/alertsync
            removing LANDesk file: common/brokerconfig
            removing LANDesk file: common/pds2_uninstall.sh
            removing LANDesk file: common/pds2d
            removing LANDesk file: common/pds2dis
            removing LANDesk file: common/poweroff.exe
            removing LANDesk file: common/uniqueid
            removing LaunchDaemon:
            removing Preference:
            removing launch daemon:
            removing Application Support directory: LANDesk
            Removing agent framework
            Checking LANDeskAgent.framework
            /private/tmp/uninstallmacagent.sh: line 227: /Library/StartupItems/cba8/cba8: Permission denied
            removing launch daemon: LANDeskAgent.framework
            removing LaunchDaemon: LANDeskAgent.framework
            removing LaunchDaemon: LANDeskAgent.framework
            removing LaunchDaemon: LANDeskAgent.framework
            removing LaunchDaemon: LANDeskAgent.framework
            removing LaunchDaemon: LANDeskAgent.framework
            removing LaunchDaemon: LANDeskAgent.framework
            removing LaunchDaemon: LANDeskAgent.framework
            removing LaunchAgent: LANDeskAgent.framework
            removing LaunchAgent: LANDeskAgent.framework
            removing LaunchAgent: LANDeskAgent.framework
            removing LaunchAgent: LANDeskAgent.framework
            removing SharedTech:
            removing LANDesk file: common/addhandler
            removing LANDesk file: common/makekey
            removing LANDesk file: common/shutdownhandler.sh
            removing LANDesk file: common/reboothandler.sh
            removing LANDesk file: common/cba8_uninstall.sh
            removing LANDesk file: common/alert
            removing LANDesk file: common/resetguard
            removing LANDesk file: common/cba
            removing LANDesk file: common/proxyhost
            removing LANDesk file: common/ldpgp
            removing LANDesk file: common/alertrender
            removing LANDesk file: common/httpclient
            removing LANDesk file: common/cbaroot/certs/064eb6a5.0
            removing LANDesk file: common/cbaroot/allowed/cba8.crt
            removing LANDesk file: common/cbaroot/allowed/logodk.gif
            removing LANDesk file: common/cbaroot/allowed/hdr_lsdk.gif
            removing LANDesk file: common/cbaroot/allowed/ldping
            removing LANDesk file: common/cbaroot/services/filexfer
            removing LANDesk file: common/cbaroot/services/exec
            removing LANDesk file: common/cbaroot/alert/alert.xml
            /private/tmp/uninstallmacagent.sh: line 262: cd: /opt/landesk/: No such file or directory
            ls: common/*strings.xml: No such file or directory
            removing LANDesk directory: common/cbaroot
            No matching processes were found
            Removing receipt database entry for: com.landesk.agent.sharedtech
            Forgot package 'com.landesk.agent.sharedtech' on '/'.
            Removing receipt database entry for: com.landesk.agent.swd
            Forgot package 'com.landesk.agent.swd' on '/'.
            Removing receipt database entry for: com.landesk.agent.vulscan
            Forgot package 'com.landesk.agent.vulscan' on '/'.
            Removing receipt database entry for: com.landesk.agent.brokerconfig
            Forgot package 'com.landesk.agent.brokerconfig' on '/'.
            Removing receipt database entry for: com.landesk.agent.ldusermenu
            Forgot package 'com.landesk.agent.ldusermenu' on '/'.
            Warning the firewall must be restarted
            Attempting to remove directory structure...
            rmdir: /usr/LANdesk/common: Directory not empty
            rmdir: /usr/LANDesk: Directory not empty
            Uninstaller: Uninstalling Tiger or later items
            <dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)
            delete: Invalid Path
            removing services entries
            removing inet entries
            restarting xinetd
            sudo: xinetd: command not found
            2013-01-25 13:56:46.461 defaults[1364:707]
            Domain (/Library/Preferences/com.apple.SoftwareUpdate) not found.
            Defaults have not been changed.
            Cleanup complete: 49 elements were removed.
            Unmounting file server...
            Running Recon...
            Locating mobile device records...
            • 3. Re: Uninstall LANDesk on a Mac
              SupportEmployee

              have you given the script executable rights? (chmod +x)

              • 4. Re: Uninstall LANDesk on a Mac
                Rookie

                Yes, rwx------ and run as sudo.

                • 5. Re: Uninstall LANDesk on a Mac
                  SupportEmployee

                  The nature of the script is that it covers multiple versions of Landesk and some things exist (or not) in different versions. To this end some errors like "not found" are going to be encountered. If you looking for it to return a clean exit code in spite of those errors you could add a line at the end of the script to set the the return code to zero ($? = 0).