14

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?

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
mo.dhouibi
  • 565
  • 1
  • 4
  • 18

5 Answers5

22

Try destroying the old app:

heroku apps:destroy app1

Note that this will permanently and irrevocably destroy app1.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
7

You can change the app from app1 to app2 by using

heroku git:remote -a app2
Akhayat
  • 71
  • 1
  • 1
5
 heroku apps:destroy --app app1 --confirm app1

 heroku git:remote -a app2
0

USE heroku git:remote which adds a git remote to an app repo

USAGE

$ heroku git:remote

OPTIONS

-a, --app=app the Heroku app to use

-r, --remote=remote the git remote to create

--ssh-git use SSH git protocol

DESCRIPTION extra arguments will be passed to git remote add

EXAMPLES

set git remote heroku to https://git.heroku.com/example.git

   `$ heroku git:remote -a example`

set git remote heroku-staging to https://git.heroku.com/example-staging.git

   `$ heroku git:remote --remote heroku-staging -a example`
mkamal
  • 199
  • 2
  • 6
0
  1. open your Dashboard and select the app you want to delete.

  2. Now that you are in the desired application click on the Settings tab.

  3. Scroll to the bottom of the page and click the "Delete app..." button.

  4. Follow the onscreen instructions to confirm the apps deletion.

cradits:- Google search top result