---
title: "removeChildCollections(at:)"
framework: photos
role: symbol
role_heading: Instance Method
path: "photos/phcollectionlistchangerequest/removechildcollections(at:)"
---

# removeChildCollections(at:)

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

## Declaration

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

## Parameters

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

## Discussion

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:) method before removing child collections. To remove objects based on their identities (without regard to their indexes in the collection), use the removeChildCollections(_:) method.

## See Also

### Managing Collections

- [addChildCollections(_:)](photos/phcollectionlistchangerequest/addchildcollections(_:).md)
- [insertChildCollections(_:at:)](photos/phcollectionlistchangerequest/insertchildcollections(_:at:).md)
- [moveChildCollections(at:to:)](photos/phcollectionlistchangerequest/movechildcollections(at:to:).md)
- [replaceChildCollections(at:withChildCollections:)](photos/phcollectionlistchangerequest/replacechildcollections(at:withchildcollections:).md)
- [removeChildCollections(_:)](photos/phcollectionlistchangerequest/removechildcollections(_:).md)
