# Cosmo Delete Asset Metadata Action

The **Cosmo Delete Asset Metadata Action** node removes one or more custom metadata entries from an asset in Cosmo.

Unlike the [Cosmo Change Asset Metadata Action](https://docs.helmut.de/helmut4-releases/helmut4-components/streamdesigner/nodes/actions/cosmo-16/cosmo-change-asset-metadata-action), which adds or updates metadata, this node deletes specific metadata fields by their key names from an already indexed asset.

The node targets the asset using its **Asset ID** and removes the specified keys from the `customMetadata` array in the database.

If a specified metadata key does not exist, the node ignores it and continues successfully without failing.

{% hint style="info" %}

#### Important Timing Note

Avoid executing this node immediately after [Cosmo Add Asset to Project Action.](https://docs.helmut.de/helmut4-releases/helmut4-components/streamdesigner/nodes/actions/cosmo-16/cosmo-add-asset-to-project-action)\
The asset may not yet be fully available in the database. If both nodes are used in the same stream, insert a [Sleep node](https://docs.helmut.de/helmut4-releases/helmut4-components/streamdesigner/nodes/actions/misc-21/sleep-action) between them (recommended delay: **at least 4000 ms**).
{% endhint %}

####

#### Input Parameters

**Asset ID**\
Database ID of the asset from which metadata should be removed.\
Typically retrieved using `{job.assetId}`.

**Metadata Keys**\
List of metadata keys to delete from the asset.

<figure><img src="https://1398472304-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcJYkTyk9qgh7aCR6dHIm%2Fuploads%2FTSM67AUqZrbGwoWsFlY9%2Fimage.png?alt=media&#x26;token=ca6569b2-75d2-465b-b6a7-e88ea3ab022b" alt="" width="351"><figcaption><p>Cosmo Delete Asset Metadata Action</p></figcaption></figure>

#### Behavior

* Deletes only custom metadata (not system metadata)
* Ignores non-existing keys
* Does not modify the media file
* Updates only the Cosmo database
* Supports asynchronous execution

#### Typical Use Cases

* removing temporary workflow flags (e.g., “QC\_PENDING”)
* clearing ingest or transfer identifiers
* resetting approval or review states
* cleaning metadata before archiving or delivery

#### Practical Note

Think of this node as a **metadata cleanup tool**.\
After automation workflows add tags to drive processing (QC, publishing, transfer, etc.), this node lets you remove those flags once the workflow is complete so the asset returns to a clean state.
