how to delete heroku app and switch to the new app created from the same files?

mo.dhouibi picture mo.dhouibi · Dec 29, 2017 · Viewed 13.2k times · Source

I am using Heroku toolbelt:

  1. Command line: >heroku create app1 (root application)
  2. Delete app1 from Heroku Dashboard in the browser.
  3. Command line: >heroku create app2 (from the same root application)
  4. I wanted to add variable: heroku config:set MYVAR=value

    Then I get the error:

    Setting MYVAR and restarting app1... !
     !    Couldn't find that app.
    

How can I switch to the new app (app2) and remove app1 completely?

Answer

Chris picture Chris · Dec 29, 2017

Try destroying the old app:

heroku apps:destroy app1

Note that this will permanently and irrevocably destroy app1.