Error Deleting Origin - [409 Conflict] There are 5 channels remaining

I am getting the following error when trying to delete an origin. The problem seems to be related to channels, however, when I list my channels I see only the default ones (stable and unstable). Please can someone advise?

hab origin delete af_tryhabitat

✗✗✗
✗✗✗ Unable to delete origin af_tryhabitat
✗✗✗
✗✗✗
✗✗✗ Before you can delete this origin, delete all package artifacts, plan
✗✗✗ connections, origin members, secrets, integrations and created channels.
✗✗✗
✗✗✗
✗✗✗ Delete any package artifacts with the command:
✗✗✗ hab pkg delete [OPTIONS] <PKG_IDENT> [PKG_TARGET]
✗✗✗
✗✗✗
✗✗✗ Delete any package plan connections (projects) under "Settings" for each package in the Builder web UI.
✗✗✗
✗✗✗
✗✗✗ Remove any origin members under "Members" in the Builder web UI.
✗✗✗
✗✗✗
✗✗✗ Delete any origin secrets with the command:
✗✗✗ hab origin secret delete [OPTIONS] <KEY_NAME>
✗✗✗
✗✗✗
✗✗✗ Delete any origin integrations under "Integrations" in the Builder web UI.
✗✗✗
✗✗✗
✗✗✗ Delete any user created origin channels with the command:
✗✗✗ hab bldr channel destroy [OPTIONS]
✗✗✗
✗✗✗
✗✗✗ [409 Conflict] There are 5 channels remaining in origin af_tryhabitat. Only two are allowed [unstable, stable].
✗✗✗

You will need to query the https://bldr.habitat.sh/v1/depot/channels/af_tryhabitat?sandbox=true endpoint which will also return "sandboxed" channels created during builds. I just opened a new issue provide a `--sandbox` option to `hab bldr channel list` · Issue #8075 · habitat-sh/habitat · GitHub to make it possible to do this with hab bldr channel list since using the rest api is not at all user friendly.

Issue fixed. Thanks Matt!

1 Like