Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 950
mo.dhouibi Avatar asked Dec 29 '17 02:12

mo.dhouibi


People also ask

How do I copy Heroku app?

If you don't have a copy of the app's code locally, you can clone it from Heroku by running the CLI command heroku git:clone -a <myapp> . Alternatively, if your source code is stored in a service like Github (highly recommended), you could also clone it from there.


3 Answers

 heroku apps:destroy --app app1 --confirm app1

 heroku git:remote -a app2
like image 85
Aishwarya kabadi Avatar answered Oct 05 '22 06:10

Aishwarya kabadi


You can change the app from app1 to app2 by using

heroku git:remote -a app2
like image 29
Akhayat Avatar answered Oct 05 '22 05:10

Akhayat


Try destroying the old app:

heroku apps:destroy app1

Note that this will permanently and irrevocably destroy app1.

like image 43
Chris Avatar answered Oct 05 '22 05:10

Chris