> ## Documentation Index
> Fetch the complete documentation index at: https://docs.promptguard.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Uninstall & Offboarding

> Cleanly remove the Shadow AI agent, drop the route, untrust the certificate, delete local data, and what happens when a device is revoked from the fleet.

Removing Shadow AI undoes everything the agent set up: the route AI traffic
takes to it, the trusted certificate, and the local event data. One command
does the teardown on every platform, and each platform's normal removal runs it
for you, except the Windows `.msi`, below.

## One command (all platforms)

The `pgshadow` tool is inside the app, not on your `PATH` on macOS or Windows:

| Platform | Command |
| - | - |
| macOS | `"/Applications/PromptGuard Shadow.app/Contents/MacOS/pgshadow" uninstall` |
| Windows | `pgshadow.exe uninstall`, from the app's install folder |
| Linux (`.deb` / `.rpm`) | `pgshadow uninstall` (it is `/usr/bin/pgshadow`) |

This:

* **Stops the proxy and the app.**
* **Removes the route**: the automatic proxy from **all** network services
  (Wi-Fi, Ethernet, and any others), and the Claude Code and Codex settings the
  agent added.
* **Removes CA trust**: the agent's certificate is deleted from the system's
  trust store (the keychain on macOS, the user certificate store on Windows, the
  NSS/system stores on Linux), so nothing on the machine continues to trust it.
* **Deletes local config and event data**, including the SQLite event log.

It names anything it could not remove and exits non-zero. It works under
`user_controls: locked`: removal is an administrator's decision, not one the
person's controls can block.

> [!TIP]
>
> Keep the local event log (for example, to hand to security before wiping a
> device) by passing `--keep-data`:
>
> ```bash theme={"system"}
> pgshadow uninstall --keep-data
> ```

## macOS

Dragging the app to the Trash runs nothing, so remove it from inside the app
first: **Settings → Remove PromptGuard**. That runs the teardown above and also
removes the network extension (macOS may ask you to confirm); then drag the app
to the Trash. The button is offered only on a Mac that isn't managed; on a
managed Mac, removal goes through your MDM, which should run the command above
before it removes the app.

### Manual fallback

If the app is already gone, undo the system changes by hand:

**1. Remove the network extension**

Reinstall the app and use **Settings → Remove PromptGuard**, or remove
PromptGuard Shadow's network extension in **System Settings**.

**2. Remove the proxy**

**System Settings → Network →** each service **→ Details… → Proxies**, and
turn off any automatic proxy configuration (PAC) the agent added. A Mac
using the network extension has none.

**3. Untrust the certificate**

Open **Keychain Access**, search your login keychain for **PromptGuard
Shadow CA**, and delete it.

**4. Delete local data**

Delete `~/.promptguard`.

## Windows

If you installed with the **`.exe`**, uninstall the normal way: **Settings → Apps
→ Installed apps → PromptGuard Shadow → Uninstall**. Its uninstaller runs the
teardown above and writes what it did to `%TEMP%\promptguard-uninstall.log`.

> [!WARNING]
>
> **The `.msi` doesn't run the teardown.** Removing the `.msi` through **Add or
> remove programs** or your deployment tooling removes the app's files but leaves
> the proxy setting, the trusted PromptGuard certificate and
> `%USERPROFILE%\.promptguard` (which holds the certificate's private key) behind.
> Run `pgshadow.exe uninstall` as each user who used it **before** removing the
> `.msi`: from your deployment tooling on a fleet, or install with the `.exe`
> instead. This is a known bug (promptguard-shadow-desktop#318).

The teardown clears the proxy auto-configuration from the per-user Internet
Settings and removes the inspection certificate from the **current user's**
certificate store. To double-check by hand: **Internet Options → Connections →
LAN settings** should show no automatic configuration script, and `certmgr.msc`
(Current User → Trusted Root Certification Authorities) should have no
**PromptGuard Shadow CA** entry. Local data lives under
`%USERPROFILE%\.promptguard`.

## Linux

* **`.deb`**: `sudo apt remove prompt-guard-shadow`. Removing the package runs
  the teardown and takes the steering service out with it.
* **`.rpm`**: remove the package with `dnf` (find its name with
  `rpm -qa | grep -i shadow`). Removal runs the teardown too.
* **AppImage**: use **Settings → Remove PromptGuard** in the app before you
  delete the file: deleting it runs nothing. Removing the certificate from the
  system trust store needs root, and the app tells you the command to run.

The teardown resets the GNOME and KDE proxy settings and removes the CA from the
trust stores. Local data lives under `~/.promptguard`.

## Offboarding a fleet device

For managed fleets, you don't need access to the machine to cut it off. Revoking
a device from the dashboard ([**Shadow AI**](https://app.promptguard.co/dashboard/shadow-ai) **→ Enrolled devices → Revoke**) is immediate:

* The device's **scoped credential is invalidated**: its next request to the
  engine is rejected.
* The agent **stops reporting** activity to your dashboard.
* The rest of the fleet is unaffected, revocation is per device.

> [!WARNING]
>
> Revocation invalidates the credential but does **not** by itself remove the
> route or certificate from the machine. To fully clean a device, also run
> `pgshadow uninstall` (or push it through your MDM). On the device itself,
> `pgshadow disconnect` revokes the credential on the server and removes it
> locally in one step.

## Next steps

> [card] [Fleet enrollment & revocation](https://docs.promptguard.co/shadow-ai/fleet-enrollment.md)
>
> How per-device credentials are issued and revoked.

> [card] [Privacy & data handling](https://docs.promptguard.co/shadow-ai/privacy-data-handling.md)
>
> What's stored locally and what you can export or delete.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.