How to stop deployment to Heroku in progress

First, install the Heroku builds plugin:

heroku plugins:install heroku-builds

Then, to cancel a build, fetch the list of the recent builds:

heroku builds -a YOUR_APP_NAME

The first line of the output will be your currently running build, the first column is the build ID.

Cancel it with:

heroku builds:cancel BUILD_ID -a YOUR_APP_NAME

Et voilĂ , this will force fail the build.

Note: you could also get the build id from the build log URL.

Leave a Comment