<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAI",
  "identifier" : "/documentation/CoreAI/AIModelCache/deleteEntry(for:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core AI",
      "CoreAI"
    ],
    "preciseIdentifier" : "s:15CoreAIDelegates12AIModelCacheC11deleteEntry3for7optionsy10Foundation3URLV_AA21SpecializationOptionsVtKF"
  },
  "title" : "deleteEntry(for:options:)"
}
-->

# deleteEntry(for:options:)

Deletes the cache entry for a specific model and specialization options combination.

```
final func deleteEntry(for modelURL: URL, options: SpecializationOptions) throws
```

## Parameters

`modelURL`

The URL of an `.aimodel` file that you previously specialized.

`options`

The specialization options to match against.

## Discussion> Note: If no ``doc://com.apple.coreai/documentation/CoreAI/AIModel`` instance currently references the entry, deletion happens
> immediately. Otherwise, an error is thrown. Deletion can only occur for an entry when the last ``doc://com.apple.coreai/documentation/CoreAI/AIModel`` releases it.

---

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)