<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKWebsiteDataStore/removeData(ofTypes:modifiedSince:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKWebsiteDataStore(im)removeDataOfTypes:modifiedSince:completionHandler:"
  },
  "title" : "removeData(ofTypes:modifiedSince:completionHandler:)"
}
-->

# removeData(ofTypes:modifiedSince:completionHandler:)

Removes website data that changed after the specified date.

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

## 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

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

---

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)