# Any way to automatically cancel redundant builds on the default branch?

**URL:** <https://discuss.circleci.com/t/any-way-to-automatically-cancel-redundant-builds-on-the-default-branch/39338>\
**Category:** Build Environment\
**Created:** [March 8, 2021, 8:24pm UTC](https://discuss.circleci.com/t/any-way-to-automatically-cancel-redundant-builds-on-the-default-branch/39338 "2021-03-08T20:24:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JakeBooher](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/jakebooher/32/19006_2.png) [@JakeBooher](https://discuss.circleci.com/u/JakeBooher)\
**Post date:** [March 8, 2021, 8:24pm UTC](https://discuss.circleci.com/t/any-way-to-automatically-cancel-redundant-builds-on-the-default-branch/39338/1 "2021-03-08T20:24:43Z")

</div>

We use a development branch as our default branch, and when PRs get merged into this branch they get deployed onto a test environment. However, as the “Auto-cancel redundant builds” options does nothing on the default branch this triggers duplicate builds to get deployed, which often times results in the wrong version being deployed if we merge multiple PRs at the same time, and do not manually cancel the builds as we go. Is there any way to work around this without changing out default branch?

---

<div class="post-metadata">

**Author:** ![yannCI](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/yannci/32/24866_2.png) [@yannCI](https://discuss.circleci.com/u/yannCI)\
**Post date:** [March 18, 2021, 5:45pm UTC](https://discuss.circleci.com/t/any-way-to-automatically-cancel-redundant-builds-on-the-default-branch/39338/2 "2021-03-18T17:45:07Z")

</div>

Hi @JakeBooher,

I just added a suggested workaround (under our Support Solutions category) that will allow you to automatically cancel redundant builds on the project’s default branch.

You can find it [here](https://discuss.circleci.com/t/auto-cancel-redundant-builds-on-the-default-branch/39468).

Let me know if this helps.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [April 22, 2021, 5:37pm UTC](https://discuss.circleci.com/t/any-way-to-automatically-cancel-redundant-builds-on-the-default-branch/39338/3 "2021-04-22T17:37:47Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
