---
title: deleteAllData()
framework: swiftdata
role: symbol
role_heading: Instance Method
path: swiftdata/modelcontainer/deletealldata()
---

# deleteAllData()

Removes all persisted model data from the app’s persistent storage.

## Declaration

```swift
func deleteAllData()
```

## Discussion

Discussion warning: After you call this method, the container immediately deletes all data from the app’s persistent storage. This deletion is permanent and cannot be undone.
