> 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-5.x/protect-your-endpoints/install-and-manage-endpoints/manage-endpoint-protection/delete-cortex-xdr-agents.md).

# Delete Cortex XDR agents

### Delete endpoints from Cortex XDR tenant views

If you have an endpoint that you no longer want to track through Cortex XDR, for example, if the endpoint disconnected from Cortex XDR, or an endpoint where the Cortex XDR agent was uninstalled, you can delete the endpoint from the Cortex XDR tenant views.

#### Deleting an endpoint triggers the following lifespan flow

* The endpoint status changes to **Deleted** , and the license returns immediately to the license pool. After a retention period of 90 days, the agent is deleted from the database and is displayed in Cortex XDR as **Endpoint Name** - `N/A (Deleted)`.
* Data associated with the deleted endpoint is displayed in the **Action Center** tables and in the **Causality View** for the standard 90-day retention period.
* Alerts that already include the endpoint data at the time of alert creation are not affected.

#### Additionally, Cortex XDR automatically deletes agents after a long period of inactivity

* Standard agents are deleted after **180 days** of inactivity. Where day one is the first 24 hours of continuous inactivity.
* VDI and TS agents are deleted after **6 hours** of inactivity.

{% hint style="info" %}
**Note:**

To reinstate an endpoint, you have to uninstall and reinstall the agent.
{% endhint %}

The following workflow describes how to delete the Cortex XDR agent from one or more Windows, Mac, or Linux endpoints.

1. Select **Inventory** → **Endpoints** → **All Endpoints**.
2. Right-click the endpoint you want to remove.

You can also select multiple endpoints if you want to perform a bulk delete.

3. Select **Endpoint Control** → **Delete Endpoint**.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xdr-5.x/protect-your-endpoints/install-and-manage-endpoints/manage-endpoint-protection/delete-cortex-xdr-agents.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
