---
title: "deleteEntries(for:)"
framework: coreai
role: symbol
role_heading: Instance Method
path: "coreai/aimodelcache/deleteentries(for:)"
---

# deleteEntries(for:)

Deletes all cache entries for a specific model, regardless of specialization options.

## Declaration

```swift
final func deleteEntries(for modelURL: URL) throws
```

## Parameters

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

## Mentioned in

Managing model specialization and caching

## Discussion

Discussion A model may have multiple entries in the cache. For example, one with cpuOnly and another with default. This method deletes all of them. note: For each entry, if no AIModel instance currently references it, deletion happens immediately. Otherwise, the system deletes the entry when the last AIModel releases it.
