---
title: "deleteHistory(for:)"
framework: Screen Time
role: symbol
role_heading: Instance Method
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+]
path: "screentime/stwebhistory/deletehistory(for:)"
---

# deleteHistory(for:)

Deletes all the web history for the URL you specify.

## Declaration

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

## Parameters

- `url`: The URL associated with the web history to delete.

## Discussion

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

## See Also

### Instance methods

- [deleteAllHistory()](screentime/stwebhistory/deleteallhistory().md)
- [deleteHistory(during:)](screentime/stwebhistory/deletehistory(during:).md)
