<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ShazamKit",
  "identifier" : "/documentation/ShazamKit/SHLibrary/removeItems(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ShazamKit"
    ],
    "preciseIdentifier" : "s:9ShazamKit9SHLibraryC11removeItemsyySaySo11SHMediaItemCGYaKF"
  },
  "title" : "removeItems(_:)"
}
-->

# removeItems(_:)

Removes an array of media items from the user’s Shazam library.

```
final func removeItems(_ items: [SHMediaItem]) async throws
```

## Parameters

`items`

An array containing the [`SHMediaItem`](/documentation/ShazamKit/SHMediaItem) objects to remove from the library.

## Discussion

Apps can only remove media items that it added to the library with [`addItems(_:)`](/documentation/ShazamKit/SHLibrary/addItems(_:)).

This throws [`SHError.Code.mediaLibrarySyncFailed`](/documentation/ShazamKit/SHError/Code/mediaLibrarySyncFailed) if the system can’t remove at least one [`SHMediaItem`](/documentation/ShazamKit/SHMediaItem) or if an error occurred during the removal. In that case, the system doesn’t remove any items from the library.

---

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)