> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xdr-agent/8.7/cortex-xdr-agent-for-macos/uninstall-the-cortex-xdr-agent-for-mac.md).

# Uninstall the Cortex XDR Agent for Mac

From the Cortex XDR management console, you can uninstall the Cortex XDR agent on an endpoint (refer to *Uninstall the Cortex XDR Agent* in the Administrator's Guide for your Cortex XDR license type). You can also uninstall the agent from the endpoint directly by using the uninstaller that comes with the Cortex XDR agent installation package that you downloaded from the Cortex XDR management console to install the agent (**Endpoints** → **Endpoint** **Management** → **Agent Installations**).

After you uninstall the agent, the endpoint is no longer protected by Cortex XDR security policies and the license returns to the pool of available licenses.

{% hint style="warning" %}

### Danger

To uninstall the agent, you need the uninstall password or a temporary token. See [Manage agent tokens](/cortex-xdr-5.x/protect-your-endpoints/install-and-manage-endpoints/manage-endpoint-protection/manage-agent-tokens.md) to obtain a temporary token.

Ensure that you extract the uninstaller from the installer package which is the same version as the Cortex XDR agent for Mac currently installed on the endpoint.

Ensure that the installer file, called `Cortex XDR Uninstaller.app`, is saved in the following location: `/Library/Application\Support/PaloAltoNetworks/Traps/bin`
{% endhint %}

1. Run the Cortex XDR agent uninstaller `Cortex XDR Uninstaller.app` from: `/Library/Application\Support/PaloAltoNetworks/Traps/bin`.
2. When prompted, enter the Cortex XDR agent uninstall password or temporary token, and click **OK**.
3. When prompted, enter the macOS credentials for a user that has permissions to uninstall apps and click **OK**.

   The uninstaller completes the uninstall process and removes the Cortex XDR agent and related files.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xdr-agent/8.7/cortex-xdr-agent-for-macos/uninstall-the-cortex-xdr-agent-for-mac.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
