Removing Jamf Remote policies using an API script
Oct 1, 2023
2 minute read

The Jamf Remote app was removed as of Jamf Pro version 10.40, but organizations that used the app may still have policies leftover from its use. These policies aren’t visible in the Jamf Pro web interface, but they do appear when making API requests. If you modify or review policies in bulk using the API (for example, using this script provided by Rich Trouton or the Prune cleanup tool), the presence of these leftover Jamf Remote policies can introduce unnecessary delays and complexity.

Bulk removal of Jamf Remote scripts is possible by searching for policies via the API that match a specific naming convention. I’ve included a script below that uses the new Jamf Pro SDK Python module to perform this bulk removal.

You’ll need to substitute the URL of your Jamf instance in line 16 of the script. When running the script you’ll be prompted for your Jamf Pro credentials. There are other authentication options available in the SDK — for example, retrieving the credentials from your macOS keychain or hard-coding the credentials into your copy of the script.

When the script runs, you’ll see confirmation of how many Jamf Remote policies were removed, as well as the name and ID of each policy.

If you prefer shell over Python, you may want to take a look at William Smith’s script.