<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/Photos/PHCollectionListChangeRequest/removeChildCollections(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:objc(cs)PHCollectionListChangeRequest(im)removeChildCollectionsAtIndexes:"
  },
  "title" : "removeChildCollections(at:)"
}
-->

# removeChildCollections(at:)

Removes the child collections at the specified indexes from the collection list.

```
func removeChildCollections(at indexes: IndexSet)
```

## Parameters

`indexes`

The indexes of the child collections to be removed from the collection list.

## Discussion

To ensure that the index set you specify is valid even if the collection list has changed since you fetched it, create a change request with a snapshot of the collection list’s contents using the [`init(for:childCollections:)`](/documentation/Photos/PHCollectionListChangeRequest/init(for:childCollections:)) method before removing child collections. To remove objects based on their identities (without regard to their indexes in the collection), use the [`removeChildCollections(_:)`](/documentation/Photos/PHCollectionListChangeRequest/removeChildCollections(_:)) method.

---

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)