Skip to content

Commit 1b3d5c4

Browse files
authored
Merge pull request #372 from smallstep/carl/jamf-pro
Add uninstall instructions to Jamf Pro docs
2 parents a2eb30b + 2206e90 commit 1b3d5c4

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

tutorials/connect-jamf-pro-to-smallstep.mdx

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ description: Configure Jamf Pro to deploy the Smallstep Agent and distribute cer
66

77
Smallstep can integrate with Jamf Pro to synchronize your device inventory, and enroll your fleet with Smallstep using the Smallstep Agent. In this document, we will configure your Jamf Pro instance for use with your Smallstep team.
88

9+
This document also contains [uninstall instructions](#uninstall-smallstep-agent-with-jamf-pro).
10+
911
# Prerequisites
1012

1113
You will need:
@@ -198,3 +200,70 @@ There's two ways to confirm installation on an endpoint:
198200
- In the Smallstep UI, go to the device's profile page. In the **Device Registration** section, you'll see an **Enrolled At** timestamp.
199201
- Alternatively, on the device itself, run `/Applications/SmallstepAgent/Contents/MacOS/SmallstepAgent version` to see that the agent is installed. And, in **System Settings**, check **Login Items** to confirm that there is a **Smallstep Agent** entry.
200202

203+
204+
# Uninstall Smallstep Agent with Jamf Pro
205+
206+
You can easily remove a Smallstep Agent that was installed on macOS endpoints via Jamf Pro.
207+
208+
### Remove the Agent Install Policy and Script
209+
210+
If you still have the Policy and Script that install the Smallstep Agent, remove those first.
211+
212+
1. In Jamf Pro, choose ⚙️ **Settings**
213+
2. Under the **Computer Management** tab, choose **Scripts**
214+
3. Delete the **Smallstep Agent Install** script
215+
4. In Jamf Pro, choose 💻 **Computers**
216+
5. Under the **Computer Management** tab, choose **Policies**
217+
6. Delete the **Smallstep Agent** policy
218+
219+
### Create an Agent Uninstall Script
220+
221+
This step will install a script on your client devices that uninstalls the Smallstep Agent.
222+
223+
1. In Jamf Pro, choose ⚙️ **Settings**
224+
2. Under the **Computer Management** tab, choose **Scripts**
225+
3. Add a new Script
226+
1. In the **General tab**, for **Display Name**: `Smallstep Agent Uninstall`
227+
2. In the Script tab:
228+
- Mode: `Shell/Bash`
229+
- Content:
230+
231+
```bash
232+
launchctl stop com.smallstep.launchd.Agent
233+
launchctl remove com.smallstep.launchd.Agent
234+
235+
/Applications/SmallstepAgent.app/Contents/MacOS/SmallstepAgent svc uninstall
236+
rm -rf /Applications/SmallstepAgent.app
237+
if pkgutil --packages | grep -q com.smallstep.Agent; then
238+
pkgutil --forget com.smallstep.Agent
239+
fi
240+
```
241+
242+
4. Choose **Save**
243+
244+
### Create a New Policy for Uninstallation
245+
246+
Next, we’ll configure the Script we just created to run on your client devices.
247+
248+
1. In Jamf Pro, choose 💻 **Computers**
249+
2. Under the **Content Management** tab, choose **Policies**
250+
3. Add a new **Policy**
251+
1. Under Options → General:
252+
- Display name: Smallstep Agent Uninstall
253+
- Trigger: Recurring Check-in
254+
- Execution Frequency: Ongoing
255+
256+
*Note: With this policy, the package will be removed at the device’s next check-in, typically within 15 minutes.*
257+
258+
2. Under Options → Scripts → Configure
259+
- Add the **Smallstep Agent Uninstall** script you created earlier
260+
3. Under Scope, select your desired policy scope. The agent will be uninstalled from all devices in this scope.
261+
4. Choose **Save**
262+
263+
### Confirm Uninstallation
264+
265+
Use **Logs** in Jamf Pro to confirm the uninstallation process completed successfully.
266+
267+
### Cleanup
268+
269+
Once the agent is uninstalled from all endpoints, remove the Policy and Script you created for uninstallation.

0 commit comments

Comments
 (0)