Definitely, you can use the keep_rules() and remove_rules() methods to keep the required rules and remove the unwanted rules, respectively. More details can be found here.