---
schema_version: "1"
id: 76265ab184b32cb133de7441bd65787bd70e682d0fa306985808e2fe04cb3d28
title: clearAttribute
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud-mobilepush/engagement_sdk/references/cordova/clearAttribute.md
canonical_url: https://developer.salesforce.com/docs/marketing/mobile-unified-sdk/references/engagement-mobile-sdk-reference/clearAttribute.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 217cfdf5c38908673eb1d3465ca12b0a6e7e138890b9c2b79fd10895ab8db594
products:
  - Salesforce Engagement SDK
---
# clearAttribute

Clears the value of an attribute in the registration.

## Syntax

`MCCordovaPlugin.clearAttribute(key, [successCallback], [errorCallback])`

## Kind

Static method of `MCCordovaPlugin`.

## Parameters

| Parameter               | Type       | Description                                                                  |
| ----------------------- | ---------- | ---------------------------------------------------------------------------- |
| `key`                   | `string`   | The name of the attribute whose value must be cleared from the registration. |
| `successCallback`       | `function` |                                                                              |
| `successCallback.saved` | `boolean`  | Whether the value of the `key` attribute was cleared from the registration.  |
| `errorCallback`         | `function` |                                                                              |

## See Also

- [Android SDK Reference](https://salesforce-marketingcloud.github.io/MarketingCloudSDK-Android/javadocs/MarketingCloudSdk/8.0/-marketing%20-cloud%20-s-d-k/com.salesforce.marketingcloud.registration/-registration-manager/-editor/clear-attribute.html)
- _SDK Reference for iOS_: [Identity Class](https://developer.salesforce.com/docs/marketing/mobile-unified-sdk/references/ios-sdk-v11/sfmc-sdk/classes/identity.md)
