---
title: "remove(_:error:)"
framework: addressbook
role: symbol
role_heading: Instance Method
path: "addressbook/abaddressbook/remove(_:error:)"
---

# remove(_:error:)

Removes an ABPerson or ABGroup record from the Address Book database.

## Declaration

```swift
func remove(_ record: ABRecord!, error: ()) throws
```

## Parameters

- `record`: The record to be removed.
- `error`: A pointer to an error object that is set to an NSError instance if an error occurs.

## Discussion

Discussion If record is nil, this method raises an exception. Your changes are not committed until you call the save() method. note: In Swift, this method returns Void and is marked with the throws keyword to indicate that it throws an error in cases of failure. You call this method in a try expression and handle any errors in the catch clauses of a do statement, as described in Error Handling in The Swift Programming Language and About Imported Cocoa Error Parameters.

## See Also

### Adding and Removing Records

- [add(_:error:)](addressbook/abaddressbook/add(_:error:).md)
- [add(_:)](addressbook/abaddressbook/add(_:).md)
- [remove(_:)](addressbook/abaddressbook/remove(_:).md)
