Skip to content

'st2 <thing> delete' should accept multiple positional args for removal #4729

Open

Description

@arm4b

Initially comes from a release testing when specific testing pack installs 100+ action aliases and we have no way to delete them in a bulky way.

The following construct fails because st2 action-alias delete can only accept single positional arg as id:

st2 action-alias delete pack.alias1 pack.alias2

Better example that ideally should work:

st2 action-alias delete $(st2 action-alias list -p chatops_tests -a id | awk '{print $2}')

The general CLI improvement here and helpful from user's perspective would be allowing multiple IDs for removal.
From what I remember, only st2 pack delete 1 2 3 4 5 only works this way.

Affected CLI:

st2 action delete
st2 action-alias delete
st2 key delete
st2 policy delete
...
and so on

Activity

  1. Yusuf-Hussien commented on Oct 7, 2026

    @Yusuf-Hussien

    I'd like to work on this. I have an implementation ready that makes all st2 <resource> delete commands accept multiple positional ids (mirroring how st2 <resource> get already works), reports ids which were not found, and returns a non-zero exit code in that case. Single id behavior stays unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions