title: Is it possible to remove a conditional formatting rule created via ConditionalFormatRuleBuilder
body: <p>I am making custom conditional formatting rules using this method: <a href="https://developers.google.com/apps-script/reference/spreadsheet/conditional-format-rule-builder" rel="nofollow noreferrer">ConditionalFormatRuleBuilder</a>.</p>
  <p>However, If I ever update it, say the color in <code>.setBackground(&quot;#FF0000&quot;)</code>, and run it again, it creates a new conditional formatting rule that conflicts with the original one.</p>
  <p>What I want to know, is in that example is there a way to remove the rule defined as rule? For example is there an opposite of <code>rules.push(rule);</code>? Something like <code>rules.remove(rule);</code> ?</p>
  <p>Here's an example from my code. I currently have this:</p>
  <pre><code>var rule1 = SpreadsheetApp.newConditionalFormatRule()
          .whenTextEqualTo(s1)
          .setBackground(s1c)
          .setRanges([r])
          .build();
  
  var rules = curSheet.getConditionalFormatRules();
        rules.push(rule1);
  
  curSheet.setConditionalFormatRules(rules);
  </code></pre>
  <p>Would it be possible to remove the rule defined as <code>rule1</code>?</p>