Uninstalling Compliance Reporter

You can do one of the following to uninstall Compliance Reporter from computers:

  • Install an uninstaller package provided by Jamf. If you have a Jamf Protect subscription, you can download the uninstaller from the Jamf Protect web app by navigating to Administrative > Downloads. If you do not use Jamf Protect, the uninstaller package is available at your Compliance Reporter-only tenant URL.

  • Run the following script to uninstall Compliance Reporter and return the /etc/security/audit_control file to its original state:

    #!/bin/bash
    
    GUI_USER=$(who | grep console | grep -v '_mbsetupuser' | awk '{print $1}')
    GUI_UID=$(id -u "$GUI_USER")
    
    # LaunchDaemon
    /bin/launchctl bootout "system/com.jamf.compliancereporter.daemon"
    /bin/rm "/Library/LaunchDaemons/com.jamf.compliancereporter.daemon.plist"
    
    /bin/launchctl bootout "gui/$GUI_UID" "/Library/LaunchAgents/com.jamf.compliancereporter.agent.plist"
    /bin/rm "/Library/LaunchAgents/com.jamf.compliancereporter.agent.plist"
    
    # Double check proc killed
    /usr/bin/killall JamfComplianceReporter
    /usr/bin/killall JamfComplianceReporterAgent
    
    # Binary
    /bin/rm /usr/local/bin/JamfComplianceReporter
    /bin/rm /usr/local/bin/JamfComplianceReporterAgent
    /bin/rm -r /Applications/JamfComplianceReporter.app
    
    # Logs
    /bin/rm -f /var/log/JamfComplianceReporter.*
    
    # Unlock audit control files
    chflags nouchg /etc/security/audit_class
    chflags nouchg /etc/security/audit_control
    chflags nouchg /etc/security/audit_event
    chflags nouchg /etc/security/audit_user
    chflags nouchg /etc/security/audit_warn
    
    # Restore audit_control file
    if [[ -e /etc/security/audit_control.backup ]]; then
        if [[ -e /etc/security/audit_control.backup ]]; then
            #statements
            # Change audit control file back to values before JamfComplianceReporter install
            /bin/rm /etc/security/audit_control
            /bin/cp /etc/security/audit_control.backup /etc/security/audit_control
            /bin/rm -f /etc/security/audit_control.backup
        fi
        # Reload the audit config
        /usr/sbin/audit -s
    fi