[API reference](https://evolu.dev/docs/api-reference) › [@evolu/react-native](https://evolu.dev/docs/api-reference/react-native) › forgetDeviceSecret

```ts
function forgetDeviceSecret(
  appName: string & Brand<"UrlSafeString"> & Brand<"AppName">,
): Task<void, UnknownError>;
```

Defined in: [react-native/src/DeviceSecret.ts:136](https://github.com/evoluhq/evolu/blob/aa223771feea747ffb1b0f5f3271574455633e37/packages/react-native/src/DeviceSecret.ts#L136)

Deletes the app's stored [DeviceSecret](https://evolu.dev/docs/api-reference/common/local-first/Auth/variables/DeviceSecret), so the next
[loadDeviceSecret](https://evolu.dev/docs/api-reference/react-native/functions/loadDeviceSecret) creates a new one, which opens a new, empty device
database. It's the start over after a [DeviceSecretUnreadableError](https://evolu.dev/docs/api-reference/react-native/interfaces/DeviceSecretUnreadableError), or
the lasting `UnknownError` that [loadDeviceSecret](https://evolu.dev/docs/api-reference/react-native/functions/loadDeviceSecret) describes: offer it
only after such an error, only when a retry failed too, and only once the
user confirms what's lost. The device database the old secret opened is no
longer opened, so its AppOwners come back only from their backups, such as
their mnemonics, and an AppOwner restored from its backup reopens its own
database with its data on this device.

Each app name has its own secret and, on Android, its own Keystore key, which
a forget deletes too, so the next load starts clean whatever made the secret
unreadable, and a forget touches no other name. It never replaces an
unreadable secret on its own, as iOS's Keychain does, because nothing tells
whether the secret is lost for good, and then Evolu itself would be the one
deleting.