---
title: removeAll()
framework: realitykit
role: symbol
role_heading: Instance Method
path: realitykit/entity/componentset/removeall()
---

# removeAll()

Removes all components from the collection.

## Declaration

```swift
@MainActor @preconcurrency func removeAll()
```

## See Also

### Updating the set

- [set(_:)](realitykit/entity/componentset/set(_:)-8sii2.md)
- [set(_:)](realitykit/entity/componentset/set(_:)-2qzsc.md)
- [remove(_:)](realitykit/entity/componentset/remove(_:).md)
