<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollectionView/deleteItems(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UICollectionView(im)deleteItemsAtIndexPaths:"
  },
  "title" : "deleteItems(at:)"
}
-->

# deleteItems(at:)

Deletes the items at the specified index paths.

```
func deleteItems(at indexPaths: [IndexPath])
```

## Parameters

`indexPaths`

An array of <doc://com.apple.documentation/documentation/Foundation/NSIndexPath> objects, each of which contains a section index and item index for the item you want to delete from the collection view. This parameter must not be `nil`.

## Discussion

Use this method to remove items from the collection view. You might do this when you remove the items from your data source object or in response to user interactions with the collection view. The collection view updates the layout of the remaining items to account for the deletions, animating the remaining items into position as needed.

You can also call this method from a block passed to the [`performBatchUpdates(_:completion:)`](/documentation/UIKit/UICollectionView/performBatchUpdates(_:completion:)) method when you want to animate multiple separate changes into place at the same time. See the description of that method for more information.

---

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)