---
title: "remove(_:span:commit:)"
framework: eventkit
role: symbol
role_heading: Instance Method
path: "eventkit/ekeventstore/remove(_:span:commit:)"
---

# remove(_:span:commit:)

Removes an event or recurring events from the event store by either committing or batching the changes.

## Declaration

```swift
func remove(_ event: EKEvent, span: EKSpan, commit: Bool) throws
```

## Parameters

- `event`: The event to remove.
- `span`: The span that indicates whether to remove a single event or all future instances of the event in the case of a recurring event.
- `commit`: doc://com.apple.documentation/documentation/Swift/true to remove the event immediately; otherwise, the change is batched until the doc://com.apple.eventkit/documentation/EventKit/EKEventStore/commit() method is invoked.

## Mentioned in

Creating events and reminders

## Discussion

Discussion This method raises an exception if it’s passed an event from another event store. 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. 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

### Related Documentation

- [commit()](eventkit/ekeventstore/commit().md)

### Accessing calendar events

- [event(withIdentifier:)](eventkit/ekeventstore/event(withidentifier:).md)
- [calendarItem(withIdentifier:)](eventkit/ekeventstore/calendaritem(withidentifier:).md)
- [calendarItems(withExternalIdentifier:)](eventkit/ekeventstore/calendaritems(withexternalidentifier:).md)
- [remove(_:span:)](eventkit/ekeventstore/remove(_:span:).md)
- [remove(_:commit:)](eventkit/ekeventstore/remove(_:commit:).md)
- [save(_:span:)](eventkit/ekeventstore/save(_:span:).md)
- [save(_:span:commit:)](eventkit/ekeventstore/save(_:span:commit:).md)
- [save(_:commit:)](eventkit/ekeventstore/save(_:commit:).md)
