How to Uninstall Old and Install New Samanage Agent on Mac using Jamf Pro (Casper)

Document created by Chris Greer samanageglobal Administrator on May 12, 2017Last modified by Yum Darling on Jun 9, 2017
Version 2Show Document
  • View in full screen mode

To uninstall the old Samanage agent using Jamf Pro (Casper), a couple of things must be in place in order to do so.


  1. The Samanage Agent must be a .DMG (either built in Composer or your builder of choice)
  2. The Samanage Agent must be Indexed in Casper Admin
  3. After indexing (or if you indexed the agent previously), Double click on the agent in Casper admin. Click on the Options tab and check the “Allow package to be uninstalled” box. This will allow the JSS to uninstall.

There are 2 different approaches to uninstalling packages using Jamf.

  1. Uninstalling a package using a policy
  2. Uninstalling a package using Casper Remote

Both approaches will get the job done but my preference is using a policy based uninstall. I think that in the instance where there are only a handful of machines, Casper Remote is a good use case but more than a couple machines and things get a little cumbersome. I will outline how to do this process both ways so the administrator can choose the best case for their environment.

Creating a policy in Jamf Pro to uninstall the Samanage Agent

Since this is a time sensitive case, I do not suggest adding this policy to Self Service or set up the deferral options for the user.
Create a Smart Group to pull in the machines running the old agent:

Add in the parameters - Make sure the App name and Version # match your current installs:

Create a policy to uninstall the old agent:

Click Packages and select your Samanage Agent - make sure to switch the action from install to uninstall in the drop down box ***If your agent is not in a .DMG format AND is not
indexed in Casper Admin, you will not see the uninstall action***

Set your scope to the smart group created above:

For easy monitoring, check the Show in JSS Dashboard.

How to use Casper Remote to uninstall the Samanage Agent


  1. Open Casper Remote and authenticate to the JSS
  2. If you have Sites enabled, select the Site you will be removing the agent from.
  3. In the list of computers, select the checkbox for each computer from which you want to uninstall the agent.


Click the Packages Tab and scroll down to the OLD Samanage Agent and check the box. Select Uninstall from the Action drop down

Do one of the following:

--To immediately perform the tasks on the specified computers, click Go.

--To schedule the tasks to take place at a specific day and time, click Schedule and choose a day and time. Then click Schedule again.

Uninstall Script:

Additional info:



How to install the NEW Samanage Agent using Jamf Pro


Create a Smart Group to check for any machines that need the Samanage Agent:


Then create a policy to install the Samanage Agent:

Add the Samanage Agent package to the policy:


Add the Script to run the installer…..make sure to set the priority to after:

Scope to the smart computer group you created:


Script that is used above:

2 people found this helpful