---
title: "removeAccount(_:withCompletionHandler:)"
framework: accounts
role: symbol
role_heading: Instance Method
path: "accounts/acaccountstore/removeaccount(_:withcompletionhandler:)"
---

# removeAccount(_:withCompletionHandler:)

Removes an account from the account store.

## Declaration

```swift
func removeAccount(_ account: ACAccount!, withCompletionHandler completionHandler: (@Sendable (Bool, (any Error)?) -> Void)!)
```

```swift
func removeAccount(_ account: ACAccount!) async throws -> Bool
```

## Parameters

- `account`: The account to remove.
- `completionHandler`: The handler to call when the removal has completed.

## Discussion

Discussion important: You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration: func removeAccount(_ account: ACAccount!) async throws -> Bool For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously. This call will fail if you don’t have sufficient rights to remove the account.

## See Also

### Removing Accounts

- [ACAccountStoreRemoveCompletionHandler](accounts/acaccountstoreremovecompletionhandler.md)
