---
title: "removeData(ofTypes:modifiedSince:completionHandler:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkwebsitedatastore/removedata(oftypes:modifiedsince:completionhandler:)"
---

# removeData(ofTypes:modifiedSince:completionHandler:)

Removes website data that changed after the specified date.

## Declaration

```swift
func removeData(ofTypes dataTypes: Set<String>, modifiedSince date: Date, completionHandler: @escaping @MainActor @Sendable () -> Void)
```

```swift
func removeData(ofTypes dataTypes: Set<String>, modifiedSince date: Date) async
```

## Parameters

- `dataTypes`: The website data types to remove.
- `date`: The target date for the data removal. The data store removes data that a website changed after this date.
- `completionHandler`: The completion handler block to execute asynchronously after the web view removes the specified data. This block has no return value and takes no parameters.

## Discussion

Discussion This method removes the specified data type from all records, but only if a website modified the record’s data after the specified date.

## See Also

### Removing specific types of data

- [removeData(ofTypes:for:completionHandler:)](webkit/wkwebsitedatastore/removedata(oftypes:for:completionhandler:).md)
