---
title: "removeItems(_:)"
framework: ShazamKit
role: symbol
role_heading: Instance Method
platforms: [iOS 17.0+, iPadOS 17.0+, Mac Catalyst 17.0+, macOS 14.0+, tvOS 17.0+, visionOS 1.0+, watchOS 10.0+]
path: "shazamkit/shlibrary/removeitems(_:)"
---

# removeItems(_:)

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

## Declaration

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

## Parameters

- `items`: An array containing the doc://com.apple.shazamkit/documentation/ShazamKit/SHMediaItem objects to remove from the library.

## Discussion

Discussion Apps can only remove media items that it added to the library with addItems(_:). This throws SHError.Code.mediaLibrarySyncFailed if the system can’t remove at least one SHMediaItem or if an error occurred during the removal. In that case, the system doesn’t remove any items from the library.

## See Also

### Managing the items in the library

- [default](shazamkit/shlibrary/default.md)
- [addItems(_:)](shazamkit/shlibrary/additems(_:).md)
- [items](shazamkit/shlibrary/items.md)
