# Automatically cancel old blocked builds

**URL:** <https://forum.buildkite.community/t/automatically-cancel-old-blocked-builds/1800>\
**Category:** Pipelines\
**Created:** [November 26, 2021, 12:45am UTC](https://forum.buildkite.community/t/automatically-cancel-old-blocked-builds/1800 "2021-11-26T00:45:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pikachu](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@pikachu](https://forum.buildkite.community/u/pikachu)\
**Post date:** [November 26, 2021, 12:45am UTC](https://forum.buildkite.community/t/automatically-cancel-old-blocked-builds/1800/1 "2021-11-26T00:45:21Z")

</div>

Hi,

Is it possible to automatically cancel the old builds that are waiting on the blocked step to avoid people accidentally unblocking old blocked builds? A use case could be someone unblocked an old blocked build that deploys an old version of the service to the production environment.

I know there is a “Skipping Builds” feature where we can cancel running intermediate builds but I want to cancel the build only during the cases when a newer execution of the pipeline is ahead of the older executions. This can happen when there are “block” steps in the pipeline.

---

<div class="post-metadata">

**Author:** ![paula](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/paula/32/954_2.png) [@paula](https://forum.buildkite.community/u/paula)\
**Post date:** [November 26, 2021, 2:16am UTC](https://forum.buildkite.community/t/automatically-cancel-old-blocked-builds/1800/2 "2021-11-26T02:16:51Z")

</div>

Hi 👋!

This functionality doesn’t exist at the moment. As a workaround, you can do this sort of check in the step following the block. Such as checking git if there are newer commits or querying some external versioning controller.

Cheers,  
Jarryd

---

<div class="post-metadata">

**Author:** ![pikachu](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@pikachu](https://forum.buildkite.community/u/pikachu)\
**Post date:** [November 26, 2021, 9:07am UTC](https://forum.buildkite.community/t/automatically-cancel-old-blocked-builds/1800/3 "2021-11-26T09:07:02Z")

</div>

Thanks. I thought about this workaround. But I was wondering if I’ll get something for free via some setting or configuration 😄

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![mdmathewdc](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/mdmathewdc/32/1164_2.png) [@mdmathewdc](https://forum.buildkite.community/u/mdmathewdc)\
**Post date:** [November 30, 2022, 11:09pm UTC](https://forum.buildkite.community/t/automatically-cancel-old-blocked-builds/1800/4 "2022-11-30T23:09:44Z")

</div>

Is there any update on this feature?

---

<div class="post-metadata">

**Author:** ![lizette](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/lizette/32/1161_2.png) [@lizette](https://forum.buildkite.community/u/lizette)\
**Post date:** [December 1, 2022, 3:37am UTC](https://forum.buildkite.community/t/automatically-cancel-old-blocked-builds/1800/5 "2022-12-01T03:37:44Z")

</div>

Hi @mdmathewdc 👋🏼,

There is still currently no dates on when this feature is going to be shipped. The workaround suggested earlier is still the best way to address this issue as of the moment.

Cheers,  
Lizette

---

<div class="post-metadata">

**Author:** ![Juhui](https://avatars.discourse-cdn.com/v4/letter/j/76d3ee/32.png) [@Juhui](https://forum.buildkite.community/u/Juhui)\
**Post date:** [September 7, 2023, 10:44pm UTC](https://forum.buildkite.community/t/automatically-cancel-old-blocked-builds/1800/6 "2023-09-07T22:44:29Z")

</div>

Hi,

Is there any update on this topic?

---

<div class="post-metadata">

**Author:** ![paula](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/paula/32/954_2.png) [@paula](https://forum.buildkite.community/u/paula)\
**Post date:** [September 7, 2023, 10:59pm UTC](https://forum.buildkite.community/t/automatically-cancel-old-blocked-builds/1800/7 "2023-09-07T22:59:00Z")

</div>

Hey @Juhui!

Unfortunately, there are not updates on this either :-/

---

<div class="post-metadata">

**Author:** ![ellie](https://avatars.discourse-cdn.com/v4/letter/e/bc8723/32.png) [@ellie](https://forum.buildkite.community/u/ellie)\
**Post date:** [September 5, 2025, 9:40am UTC](https://forum.buildkite.community/t/automatically-cancel-old-blocked-builds/1800/8 "2025-09-05T09:40:10Z")

</div>

Hi! Any updates on this?

---

<div class="post-metadata">

**Author:** ![Joe.Coleman](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/joe.coleman/32/1625_2.png) [@Joe.Coleman](https://forum.buildkite.community/u/Joe.Coleman)\
**Post date:** [September 5, 2025, 9:53am UTC](https://forum.buildkite.community/t/automatically-cancel-old-blocked-builds/1800/9 "2025-09-05T09:53:19Z")

</div>

Hey @ellie,

Welcome to the Buildkite community 🥳

Apologies, but there’s still not update on this one - we’d still recommend the initially suggested workaround:

> As a workaround, you can do this sort of check in the step following the block. Such as checking git if there are newer commits or querying some external versioning controller.
