Why am I unable to remove addons using `addons:detach` from my application ?

Issue

When using heroku addons:detach command, for example: heroku addons:detach HEROKU_POSTGRESQL_BRONZE --app sushi

It is failing with the below error:

HEROKU_POSTGRESQL_BRONZE --app sushi
Detaching HEROKU_POSTGRESQL_BRONZE to postgresql-contoured-xxxxx from ⬢ sushi... !
▸ Cannot destroy last attachment to billing app for resource postgresql-contoured-xxxx

Resolution

  • You can only use the addons:detach command for addons which have been attached to an app with heroku addons:attach.

  • heroku addons:attach is only used for attaching add-ons which have already been provisioned to another app. i.e they are still billed against the original app and are available to be used by both apps.

  • If you want to delete this addon/database you should use heroku addons:destroy.

  • You can read more about this here: Attaching an add-on to another app

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support