<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASCredentialIdentityStore/removeAllCredentialIdentities(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "c:objc(cs)ASCredentialIdentityStore(im)removeAllCredentialIdentitiesWithCompletion:"
  },
  "title" : "removeAllCredentialIdentities(_:)"
}
-->

# removeAllCredentialIdentities(_:)

Removes all existing credential identities from the store.

```
func removeAllCredentialIdentities(_ completion: (@Sendable (Bool, (any Error)?) -> Void)? = nil)
```

## Parameters

`completion`

An optional completion handler called after removing all existing credential identities. If the operation fails, an error with domain [`ASCredentialIdentityStoreErrorDomain`](/documentation/AuthenticationServices/ASCredentialIdentityStoreErrorDomain) is provided and none of the existing credential identities are removed from the store.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)