<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Screen Time",
  "identifier" : "/documentation/ScreenTime/STWebHistory/deleteHistory(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Screen Time"
    ],
    "preciseIdentifier" : "c:objc(cs)STWebHistory(im)deleteHistoryForURL:"
  },
  "title" : "deleteHistory(for:)"
}
-->

# deleteHistory(for:)

Deletes all the web history for the URL you specify.

```
func deleteHistory(for url: URL)
```

## Parameters

`url`

The URL associated with the web history to delete.

## Discussion

The framework references the entire URL to determine which web-usage data to
delete.

---

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)