<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreSpotlight",
  "identifier" : "/documentation/CoreSpotlight/CSSearchableIndex/deleteAppEntities(ofType:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Spotlight",
      "CoreSpotlight"
    ],
    "preciseIdentifier" : "s:So17CSSearchableIndexC10AppIntentsE06deleteC8Entities6ofTypeyxm_tYaKAC13IndexedEntityRzlF"
  },
  "title" : "deleteAppEntities(ofType:)"
}
-->

# deleteAppEntities(ofType:)

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

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

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.

---

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)