---
title: "removeRows(at:includeSubrows:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsruleeditor/removerows(at:includesubrows:)"
---

# removeRows(at:includeSubrows:)

Removes the rows at given indexes.

## Declaration

```swift
func removeRows(at rowIndexes: IndexSet, includeSubrows: Bool)
```

## Parameters

- `rowIndexes`: Indexes of one or more rows in the receiver. important: Raises an NSRangeException if any index in rowIndexes is less than 0 or greater than or equal to the number of rows.
- `includeSubrows`: If doc://com.apple.documentation/documentation/Swift/true, then sub-rows of deleted rows are also deleted; if doc://com.apple.documentation/documentation/Swift/false, then each sub-row is adopted by its first non-deleted ancestor, or becomes a root row.

## See Also

### Manipulating Rows

- [addRow(_:)](appkit/nsruleeditor/addrow(_:).md)
- [insertRow(at:with:asSubrowOfRow:animate:)](appkit/nsruleeditor/insertrow(at:with:assubrowofrow:animate:).md)
- [removeRow(at:)](appkit/nsruleeditor/removerow(at:).md)
