---
title: "deleteEntry(for:options:)"
framework: coreai
role: symbol
role_heading: Instance Method
path: "coreai/aimodelcache/deleteentry(for:options:)"
---

# deleteEntry(for:options:)

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

## Declaration

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

## Mentioned in

Managing model specialization and caching

## Discussion

Discussion note: If no AIModel instance currently references the entry, deletion happens immediately. Otherwise, the system deletes the entry when the last AIModel releases it.
