Updating the stack on Heroku Updating the stack on Heroku heroku heroku

Updating the stack on Heroku


Setting Heroku stack. In this case to heroku-20 equivalent with Ubuntu 20.04

$ heroku stack:set heroku-20

Since you are using a different stack, the old cache may not be compatible. Clearing cache:

$ heroku plugins:install heroku-builds$ heroku builds:cache:purge -a appname

Triggering a rebuild:

$ git commit --allow-empty -m "Purge cache"$ git push heroku master

Note:

You have to make sure that the buildpack you are using is compatible with heroku-20. If it is not it will not work. You will have to wait for the maintainer to update, use a different buildpack or fix the buildpack yourself and use that.
If you follow this step by step it is similar to deploying an entirely fresh app.