> For the complete documentation index, see [llms.txt](https://docs.cheqd.io/product/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cheqd.io/product/advanced/tooling/cheqd-node-cli/deactivate-did.md).

# Deactivate a DID

The purpose of this document is to describe how an existing DID (and associated DIDDoc) can be *deactivated* using [the `cheqd-node` Cosmos CLI](https://docs.cheqd.io/node/getting-started/cheqd-cli).

> **NOTE: The procedures below are only recommended for development purposes!**
>
> Using `cheqd-node` Cosmos CLI for real-world production usage is not recommended, since the identity keys are passed in raw form to the CLI. This is fine in development/testing usage, but is not recommend for mainnet.
>
> Developers are encouraged to use [production-grade CLI tools such as Veramo SDK for cheqd](/product/sdk/veramo.md) or look at [our developer guide on how to integrate custom applications](/product/advanced/tooling/advanced.md).

## Setup

### Pre-Requisites

* Learn how to [create a DID with cheqd Cosmos CLI](/product/advanced/tooling/cheqd-node-cli/create-did.md)
* [Query an existing DID/DIDDoc](/product/advanced/tooling/cheqd-node-cli/query-did.md) with cheqd Cosmos CLI

## Deactivate an existing DID

### 1. Compile the payload

As in flow with [creating DID-Document](/product/advanced/tooling/cheqd-node-cli/create-did.md) we need to compile `payload.json` file with private key inside and pass it to the CLI. The resulting JSON in our example will look liks:

```json
{
  "payload": {
    "id": "did:cheqd:testnet:b0ca0b75-ca6a-4674-a261-45f6dd0c9c77"
  },
  "signInputs": [
    {
      "verificationMethodId": "did:cheqd:testnet:b0ca0b75-ca6a-4674-a261-45f6dd0c9c77#key1",
      "privKey": "FxaJOy4HFoC2Enu1SizKtU0L+hmBRBAEpC+B4TopfQoyetOF5T68Ks3db5Yy9ykFdgEboPUes3m6wvXNLpbv+Q=="
    }
  ]
}
```

### 3. Send an deactivate DID transaction to the ledger

Send the updated DIDDoc to the ledger. This *must* be signed with the correct identity keys:

```bash
cheqd-noded tx cheqd deactivate-did <Payload_in_JSON>  \
  --from <cosmos_account> --node <url> --chain-id <chain> --fees <fee>
```

### Flags

* `Payload_in_JSON` - previously compiled JSON.
* `--from`: Cosmos account key which will pay fees for the transaction to be written to ledger.
* `--node`: IP address or URL of node to send request to
* `--chain-id`: E.g., `cheqd-testnet-6`
* `--fees`: Set to 10000000000ncheq, which is the fixed fee for deactivating a DID

> Note that each of cheqd's on-ledger identity transactions has a **fixed fee,** [the pricing for cheqd DIDs and DID-Linked Resources can be found here](https://docs.cheqd.io/node/architecture/adr-list/adr-005-genesis-parameters#cheqd-module-did-module). If your account has insufficient balance the transaction will fail.

### Example

```bash
cheqd-noded tx cheqd deactivate-did "payload.json" \
  --from my_account --node http://rpc.cheqd.network:443 --chain-id cheqd-testnet-6 --fees 10000000000ncheq
```


---

# 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://docs.cheqd.io/product/advanced/tooling/cheqd-node-cli/deactivate-did.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.
