<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKRuleSystem/removeAllRules()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKRuleSystem(im)removeAllRules"
  },
  "title" : "removeAllRules()"
}
-->

# removeAllRules()

Removes all rules from the system.

```
func removeAllRules()
```

## Discussion

Calling this method also empties the [`agenda`](/documentation/GameplayKit/GKRuleSystem/agenda) and [`executed`](/documentation/GameplayKit/GKRuleSystem/executed) arrays.

## See Also

[`agenda`](/documentation/GameplayKit/GKRuleSystem/agenda)

The list of rules to be considered when evaluating the system.

[`executed`](/documentation/GameplayKit/GKRuleSystem/executed)

The list of rules whose actions have been performed during evaluation of the system.



---

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)