---
title: List and delete React Native source maps
source: https://docs.newrelic.com/docs/mobile-monitoring/new-relic-monitoring-react-native/list-delete-react-native-source-maps
---

When you [upload a React Native source map](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-monitoring-react-native/react-native-agent-js-error-reporting), the upload response contains a unique entity ID (`guid`) for that source map. You can use this ID to verify or delete the file.

If you don't have a record of a source map's `guid`, use New Relic's [NerdGraph API](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph) or NRQL to search for, list, and delete your uploaded source maps, as described below.

> #### ⚠️ IMPORTANT
>
> Querying and deleting source maps with NerdGraph requires a [User API key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#user-key). Include it in the `Api-Key` header of your NerdGraph request.

## Find a source map's GUID [#find-guid]

To perform management tasks like deletion, you must first obtain the unique identifier (`guid`) of the source map entity. Search for it using the `entitySearch` query in NerdGraph.

> #### 💡 TIP
>
> When you query source maps in NerdGraph, prefix mapping metadata attributes with `tags.`, with the exception of the `name` and `type` fields.

```graphql
{
  actor {
    entitySearch(
      query: "type = 'REACT_NATIVE_SOURCEMAP' and tags.applicationId = '<YOUR_APPLICATION_ID>' and tags.appVersion = '12424.0392' and tags.jsBundleId = '87124712' and name = 'app.min.js.map'"
    ) {
      results {
        entities {
          name
          guid
          tags {
            key
            values
          }
        }
      }
    }
  }
}
```

Locate the `guid` string in the response to use in subsequent management operations:

```json
{
  "data": {
    "actor": {
      "entitySearch": {
        "results": {
          "entities": [
            {
              "guid": "<YOUR_ENTITY_GUID>",
              "name": "app.min.js.map"
            }
          ]
        }
      }
    }
  }
}
```

## Delete a source map [#delete]

Once you have the entity `guid`, use the `entityManagementDelete` mutation in NerdGraph to remove the source map:

```graphql
mutation {
  entityManagementDelete(id: "<YOUR_ENTITY_GUID>") {
    id
  }
}
```

The response returns the deleted entity's `id`:

```json
{
  "data": {
    "entityManagementDelete": {
      "id": "<YOUR_ENTITY_GUID>"
    }
  }
}
```

> #### ⚠️ IMPORTANT
>
> Changes aren't immediately reflected across all systems. After a deletion or a new upload, it can take a few minutes for the data to sync with `entitySearch`. During this synchronization window, a deleted source map ID may still temporarily appear in search results.

## List source maps [#list]

You can audit and view your uploaded source maps using either NerdGraph or NRQL. Filter your files using the following mapping attributes:

-   `jsBundleId`
-   `appVersion`
-   `applicationId`
-   `name`
-   `type` (or `EntityType`)
-   `accountId`

### Syntax differences: NerdGraph vs. NRQL [#syntax-differences]

The main functional difference between querying with NerdGraph and NRQL is attribute namespacing:

| Interface   | Attribute prefix requirement                                                      | Scope constraint                                                                       |
| ----------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| NerdGraph   | Requires the `tags.` prefix for metadata fields (for example, `tags.jsBundleId`). | Global search across accessible entities unless you include `accountId` in the filter. |
| NRDB (NRQL) | Uses raw attribute names directly (for example, `jsBundleId`).                    | Restricted to the targeted account context.                                            |

### List with NerdGraph [#list-nerdgraph]

Include `accountId` in the filter to scope the search to a specific account:

```graphql
{
  actor {
    entitySearch(
      query: "type = 'REACT_NATIVE_SOURCEMAP' and tags.applicationId = '<YOUR_APPLICATION_ID>' and tags.appVersion = '12424.0392' and tags.jsBundleId = '87124712' and name = 'app.min.js.map' and accountId = <YOUR_ACCOUNT_ID>"
    ) {
      results {
        entities {
          name
          guid
          tags {
            key
            values
          }
        }
      }
    }
  }
}
```

### List with NRQL [#list-nrql]

Select the specific account ID context used during the initial file upload, then run the following query against the `Entity` namespace:

```sql
FROM Entity SELECT * WHERE type = 'REACT_NATIVE_SOURCEMAP' AND name = 'app.min.js.map' AND jsBundleId = '87124712' AND appVersion = '12424.0392'
```
