# Deleting Deployments

After you have deployed a service using `cxcloud deploy` you can run the following command to delete the deployment and all of it's configurations:

```bash
$ cxcloud deploy --purge
```

This will undo anything that is done by running `cxcloud deploy` except it's namespace. If you wish to destroy the namespace as well, run:

```bash
$ cxcloud deploy --purge-all
```

{% hint style="warning" %}
If multiple services are using the same namespace that you have defined in your manifest, this command will purge all other services as well because it will destroy the namespace.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.cxcloud.com/guides/managing-infrastructure/deleting-deployments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
