<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKLocalPlayer/deleteSavedGames(withName:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKLocalPlayer(im)deleteSavedGamesWithName:completionHandler:"
  },
  "title" : "deleteSavedGames(withName:completionHandler:)"
}
-->

# deleteSavedGames(withName:completionHandler:)

Deletes saved games with the specified filename.

```
func deleteSavedGames(withName name: String, completionHandler handler: (@Sendable ((any Error)?) -> Void)? = nil)
```

## Parameters

`name`

A string that identifies the saved game data to delete.

`handler`

The block that this method calls when it completes the request.

    The block receives the following parameters:

- error: Describes an error if it occurs, or `nil` if the operation completes.

## Discussion

Alternatively, use the [`resolveConflictingSavedGames(_:with:completionHandler:)`](/documentation/GameKit/GKLocalPlayer/resolveConflictingSavedGames(_:with:completionHandler:)) method to keep one of the saved games that use the same filename.

---

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)