---
schema_version: "1"
id: 536f9dbc5316216561425740a7fabdce5b635320e437cd5ae2086662973989b4
title: apex trace delete
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/sfclireference/guides/apex/cli_reference_apex_trace_delete.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-cli-reference/guide/cli_reference_apex_trace_delete.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8eec1c559d168da9a15479b0497424d62f2b5bb2e3c64299a0f96b292fc0ba76
products:
  - Salesforce CLI Command Reference
  - salesforcedx
---
<!-- prettier-ignore-start -->

# apex trace delete

Delete a trace flag in your org.

## Description for apex trace delete

Remove a trace flag by its ID. Use "sf apex trace list" to find trace flag IDs in your org.

## Flags

| Flag Name (Long) | Flag Name (Short) | Description |
|------------------|-------------------|-------------|
| <code>&#8209;&#8209;api&#8209;version</code> | N/A | **Type:** Value<br><br>Override the api version used for api requests made by this command |
| <code>&#8209;&#8209;flags&#8209;dir</code> | N/A | **Type:** Value<br><br>Import flag values from a directory. |
| <code>&#8209;&#8209;json</code> | N/A | **Type:** Boolean<br><br>Format output as json. |
| <code>&#8209;&#8209;target&#8209;org</code> | <code>&#8209;o</code> | **Type:** Value<br>**Required**<br><br>Username or alias of the target org. Not required if the `target-org` configuration variable is already set. |
| <code>&#8209;&#8209;trace&#8209;flag&#8209;id</code> | <code>&#8209;i</code> | **Type:** Value<br>**Required**<br><br>ID of the trace flag to delete. |

## Examples for apex trace delete

Delete a trace flag by ID in your default org:

```shell
sf apex trace delete --trace-flag-id 7tf000000000001AAA
```

Delete a trace flag by ID in an org with alias "my-org":

```shell
sf apex trace delete --trace-flag-id 7tf000000000001AAA --target-org my-org
```
<!-- prettier-ignore-end -->
