---
title: "deleteAppEntities(ofType:)"
framework: corespotlight
role: symbol
role_heading: Instance Method
path: "corespotlight/cssearchableindex/deleteappentities(oftype:)"
---

# deleteAppEntities(ofType:)

Deletes all app entities of the specified type from the current index.

## Declaration

```swift
func deleteAppEntities<Entity>(ofType entityType: Entity.Type) async throws where Entity : IndexedEntity
```

## Parameters

- `entityType`: One of your app’s entity types. For example, specify MyEntity.Type to delete all instances of MyEntity you added to the index.

## Discussion

Discussion This method removes all entities of the specified type from the app’s indexes. You might call this method as a precursor to indexing a new set of entity objects.

## See Also

### Indexing app entities

- [indexAppEntities(_:priority:)](corespotlight/cssearchableindex/indexappentities(_:priority:).md)
- [deleteAppEntities(identifiedBy:ofType:)](corespotlight/cssearchableindex/deleteappentities(identifiedby:oftype:).md)
