---
title: "removeAll(where:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/entitycollection/removeall(where:)"
---

# removeAll(where:)

Removes all entities from this collection that satisfy the given predicate.

## Declaration

```swift
mutating func removeAll(where: (Entity) throws -> Bool) rethrows
```

## Discussion

Discussion note: This operation can invalidate the index order of any remaining entities.
