---
title: "Retire or uninstall the agent"
description: "Retire an endpoint in the console, remove the Outpost agent from a Windows, Linux, BSD, or macOS computer, and bring a computer back later."
url: "https://support.outpostplatform.com/agent/retire-and-uninstall/"
product: "agent"
type: "how-to"
status: "draft"
ai_summary: "Retire endpoint (Actions menu, Lifecycle, needs endpoint:write) revokes the certificate, stops billing, keeps the record for audit. Uninstall removes the agent: Windows outpost-setup.exe --uninstall or Apps, MSI with msiexec /x (keeps ProgramData, no retire), outpost-agent uninstall on Linux, BSD, macOS (retires unless --keep-data). Reinstalling the same computer revives its record."
availability:
  plans: ["home-lab", "essentials", "enterprise", "msp"]
  permission: "endpoint:write"
  preview: false
source: "https://gitlab.com/outpostplatform/docs/-/edit/main/src/content/docs/agent/retire-and-uninstall.md"
license: "CC BY 4.0"
---

# Retire or uninstall the agent

Retiring takes an endpoint out of management in the console. Uninstalling
removes the agent from the computer. Most of the time you want both: when a
computer is replaced, sold, or scrapped, uninstall the agent if you still can,
and make sure the endpoint is retired. This page covers each.

| | Retire | Uninstall |
| --- | --- | --- |
| Where | The console | The computer |
| Effect on the endpoint record | Kept, with the status retired, for the audit trail | Retired as well, on most install types |
| Effect on the agent | Its certificate is revoked, so it can no longer connect | Removed from the computer |
| Billing | The endpoint stops counting toward your plan | The same, once it is retired |

## Before you begin

- Retiring needs the `endpoint:write` permission. See
  [Roles and permissions](/depot/roles-and-permissions/).
- Uninstalling needs administrator rights (Windows) or root on the computer.
- You cannot undo a retirement in the console. To manage the computer again,
  you enroll it again with a new token.

:::caution
Uninstalling deletes the endpoint's certificate and private key from the
computer, except where noted below. A reinstall then enrolls as a fresh
identity. Use `--keep-data` when you are reinstalling in place and want the
endpoint to keep its identity.
:::

## Retire an endpoint in the console

Use this when the computer is gone, or when you uninstall the agent in a way
that does not retire it.

1. Go to **Endpoints** > **All endpoints** and open the endpoint.
2. Open the **Actions** menu and, under **Lifecycle**, select **Retire
   endpoint**.
3. Read the dialog. It explains that retiring revokes the endpoint's
   certificate and stops it being billed, and that its record stays for the
   audit trail.
4. Optionally, enter a **Reason**. It is kept in the audit log.
5. Select **Retire endpoint**.

The console returns to the endpoint list and shows that the endpoint was
retired and its certificate revoked. The agent on the computer stays installed
but can no longer connect. Uninstall it as described below if you can reach
the computer.

Retirement resolves the endpoint's open and acknowledged alerts as
**Endpoint retired** and stops pending escalations. This records that the
endpoint left management, not that the triggering conditions were remediated.
Alert views show current endpoints by default. Select **Include retired
endpoints** to review their alerts. See [Alerts](/service-desk/alerts/).

## Uninstall from Windows

**If you installed with the single-file installer** (`outpost-agent-setup.exe`):

- In Windows, open the list of installed apps, select **Outpost Agent**, and
  uninstall it, or
- Run the uninstaller from an elevated command prompt or your deployment tool:

  ```powershell
  & "C:\Program Files\Outpost\Agent\outpost-setup.exe" --uninstall
  ```

The uninstaller removes the services, the tray app and its sign-in startup
entry, and the program folder. It then tells your Outpost the endpoint is
retired and deletes `C:\ProgramData\Outpost`, which holds the configuration,
certificate, and private key. Add `--keep-data` to keep that folder. Exit code
`0` means it finished. Its log is `outpost-setup.log` in the temporary folder
of the account that ran it.

**If you installed with the MSI:**

```powershell
msiexec /x outpost-agent-setup.msi /qn
```

Or remove it with the deployment tool that installed it. Removing the MSI
removes the services and program files, but it keeps `C:\ProgramData\Outpost`
and does not retire the endpoint. Retire the endpoint in the console, and
delete `C:\ProgramData\Outpost` if the computer is leaving your organization.

## Uninstall from Linux, FreeBSD, or OpenBSD

1. Run the uninstall as root:

   ```sh
   sudo /opt/outpost/outpost-agent uninstall
   ```

   On OpenBSD, use `doas`. The command stops and removes the service, tells
   your Outpost the endpoint is retired, and deletes `/etc/outpost`. Add
   `--keep-data` to keep `/etc/outpost`.
2. Delete the program directory, which `uninstall` leaves in place:

   ```sh
   sudo rm -rf /opt/outpost
   ```

If the agent was installed from a `.deb` or `.rpm` package, `uninstall`
refuses and names the package command to use instead: `apt remove
outpost-agent` or `dnf remove outpost-agent`. Removing the package keeps
`/etc/outpost` and does not retire the endpoint. `apt purge outpost-agent`
also deletes `/etc/outpost`. Retire the endpoint in the console.

## Uninstall from macOS (Preview)

```sh
sudo /usr/local/outpost/outpost-agent uninstall
```

The command removes the agent's LaunchDaemon and the LaunchAgents for the tray
app and the remote desktop helper, tells your Outpost the endpoint is retired,
and deletes `/etc/outpost`. Add `--keep-data` to keep it. Delete
`/usr/local/outpost` and `/Applications/Outpost Tray.app` afterwards.

## Verify

1. In the console, go to **Endpoints** > **All endpoints**.
2. Select the **Retired** view. The endpoint is listed there and no longer
   appears in **In service**.

If the uninstall could not reach your Outpost, its output or log says `could
not tell the Depot this endpoint is retired` and asks you to retire it from the
console. Do that, as described above.

## Bring a computer back

Install the agent again with a new installer or token. See
[Install and enroll the agent](/agent/install-and-enrollment/). When a retired
computer enrolls again, Outpost recognizes its hardware and returns its
existing record to service instead of creating a second endpoint. It counts
toward your plan's endpoint limit again.

## Next steps

- [Endpoints](/endpoints/)
- [Troubleshoot the agent](/agent/troubleshooting/)
