Remove Jamf Pro (Casper JSS) Client Components
DescriptionWhat this Fileset does
ToThis macOS Fileset runs Jamf Pro's local jamf removeFramework command to remove allJamf Casper JAMF Software-relatedmanagement components from computersa thatcomputer have beenpreviously managed by Jamf Pro or Casper JSS. Confirm the JSS.Mac is ready to leave Jamf before deployment; removing the framework can end Jamf policy, inventory, and remote-management functions.
IngredientsRequirements
FWFileWave Central access to create and deploy a macOS Fileset(OtherAtools,targetfeatures,Mac on which the Jamf binary is still installed andapplicationsexecutable
Directions
Create the Fileset
CreateInaFileWavenewCentral,emptyopenFilesetFilesets(FromandtheselectFileset View :New Desktop Fileset > Empty: Type a Name > OK).With it selected: ClickName the Fileset, select it, and open Scriptsitem in the button bar.- Create
aannewActivationactivation script and name it.Script. - Paste the script below
andwithouteditchanging the Jamf command unless your Jamf documentation requires a different supported removal method.#!/usr/bin/env zsh # This will remove JAMF from macOS # Function to identify the location of the jamf binary CheckBinary() { # Identify location of jamf binary using modern command substitution jamf_binary=$(which jamf) # Evaluate conditions to identify the correct binary path if [[ -z "$jamf_binary" ]] && [[ -e "/usr/sbin/jamf" ]] && [[ ! -e "/usr/local/bin/jamf" ]]; then jamf_binary="/usr/sbin/jamf" elif [[ -z "$jamf_binary" ]] && [[ ! -e "/usr/sbin/jamf" ]] && [[ -e "/usr/local/bin/jamf" ]]; then jamf_binary="/usr/local/bin/jamf" elif [[ -z "$jamf_binary" ]] && [[ -e "/usr/sbin/jamf" ]] && [[ -e "/usr/local/bin/jamf" ]]; then jamf_binary="/usr/local/bin/jamf" fi # Error handling for missing jamf binary if [[ -z "$jamf_binary" ]] || [[ ! -x "$jamf_binary" ]]; then echo "Error: jamf binary not found or not executable." exit 1 fi } # Function to remove the JAMF framework RemoveJamf() { "$jamf_binary" removeFramework || { echo "Error: Failed to remove JAMF framework." exit 2 } } # Main script execution CheckBinary RemoveJamf # Exit with a success status exit 0 AssociateDeploy the Fileset to a pilot Mac first, verify that Jamf management is removed and FileWave remains healthy, then expand the deployment as a standard or scheduled association.