Guide · Heroku

Heroku-22 end of life: dates, commands and upgrade notes

Updated · Rotomal

Heroku-22 was deprecated on 20 May 2026 and reaches end-of-life on 30 April 2027, when Ubuntu 22.04 standard support ends. Apps keep running after that, but from 1 May 2027 Heroku no longer allows builds for Heroku-22 apps. Upgrade with heroku stack:set heroku-24 or heroku-26 on a test or staging app, rebuild, fix what breaks, then promote to production.

Key dates

DateWhat happens
20 May 2026Heroku-22 deprecated; apps keep running but should be upgraded
1 November 2026The first build of each Heroku-22 app in a 30-day period fails with a deprecation error; retrigger it to deploy
1 February 2027The same deliberate build error, now once in every 7-day period
1 April 2027The same deliberate build error, now once in every 24-hour period
30 April 2027Heroku-22 end-of-life; no more stack security updates
1 May 2027Builds no longer allowed for Heroku-22 apps; running apps and non-build functions continue
April 2029Heroku-24 supported through this date
April 2031Heroku-26 supported through this date

Find your Heroku-22 apps

heroku plugins:install @heroku-cli/plugin-apps-table
heroku apps:table --filter="STACK=heroku-22"

Upgrade steps

  • Test first on a Review App, a separate test app or your staging app.
  • Set the stack: heroku stack:set heroku-26 -a <app name> (or heroku-24).
  • Trigger a build; the new stack applies only on the next build. With no changes, push an empty commit.
  • Check the app, then update the stack in app.json so Review Apps and Heroku CI match.
  • In a pipeline, upgrade and verify staging, then promote; promotion copies the slug and sets the target's stack.
heroku stack:set heroku-26 -a my-app-staging
git commit --allow-empty -m "Upgrading to heroku-26"
git push heroku main

What breaks moving from Heroku-22 to Heroku-24

Change on Heroku-24What to do
Git only at build timeUse SOURCE_COMMIT at build time or HEROKU_BUILD_COMMIT at run time, or add git through the APT buildpack
System Python only at build time, as python3Add the Python buildpack and a .python-version file if you need Python at run time
Only C, C.utf8, POSIX and en_US.utf8 localesAdd the locale buildpack for others
No US/* time zone namesUse names like America/Chicago, or add tzinfo-data (Ruby) or time/tzdata (Go)
OpenJDK no longer defaults to 8Pin your Java version explicitly
Google Chrome and Redis stunnel buildpacks unsupportedUse the Chrome for Testing buildpack; use Redis native TLS
APT sources moved to deb822 formatFix third-party buildpacks that override APT source paths
Docker images default to the non-root heroku userAdd USER root where your Dockerfile writes outside /home/heroku or /tmp

Heroku says there are no known breaking OS changes from Heroku-24 to Heroku-26. Also check for pinned buildpack versions and end-of-life Ruby versions, which Heroku lists as common upgrade problems.

Roll back if needed

heroku releases
heroku rollback v12

Or set the original stack again with heroku stack:set and redeploy, while that stack still allows builds.

If you want it done for you

Heroku-22 Exit runs the upgrade on a staging or review app, fixes what fails and hands you a pull request, with the rollback written down. $149 per app, starting with a stack check.

Questions

What happens to Heroku-22 apps after 30 April 2027?

They keep running without stack security updates. From 1 May 2027 they cannot be built, so new deploys fail until the app moves to a newer stack.

How do I upgrade from Heroku-22?

Run heroku stack:set heroku-24 or heroku-26 on a test or staging app, trigger a new build, fix what fails, then promote or apply the same change to production.

Should I skip Heroku-24 and go straight to Heroku-26?

You can. Heroku recommends the latest stack and says to review the upgrade notes for every generation in between, so read the Heroku-24 notes as well.

Why did my build fail after the stack change?

Common causes are pinned buildpack versions, a stale build cache with third-party buildpacks, end-of-life Ruby versions, and the Heroku-24 changes such as Git and Python being build-time only.

Can I upgrade from the Dashboard?

Yes. App settings have an Upgrade Stack button; the change applies on the next deploy.

Is Heroku-24 or Heroku-26 the default?

Heroku-24 is the default for new Cedar apps. Heroku-26 must be chosen explicitly.

Sources

Guides and answers