incus icon indicating copy to clipboard operation
incus copied to clipboard

Support deleting multiple objects in CLI

Open thebigbone opened this issue 1 month ago • 4 comments

Is there an existing issue for this?

  • [x] There is no existing issue for this feature

What are you currently unable to do

When I try to specify multiple args to incus network delete, it displays the help message instead of deleting bridge interfaces. incus instances takes multiple args but maybe network delete doesn't.

Current incus version:

Client version: 6.18
Server version: 6.18

What do you think would need to be added

No response

thebigbone avatar Nov 12 '25 14:11 thebigbone

Same thing with network acl as well, doesn't take multiple args.

thebigbone avatar Nov 12 '25 14:11 thebigbone

I believe only incus delete and incus image delete currently support it, but it should be expanded to any command that doesn't need a qualifier for delete.

That is, incus network delete or incus network acl delete could delete multiple things, but incus network forward delete couldn't as it takes multiple arguments (network and forward).

So the total set of commands to alter should be somewhat small.

stgraber avatar Nov 12 '25 16:11 stgraber

Hey @stgraber, let me queue up this issue in my list. could you please briefly explain what I need to do?

Mujib-Ahasan avatar Nov 13 '25 13:11 Mujib-Ahasan

Update all the relevant delete commands so they can take multiple objects to delete, then running a loop over them, similar to what we do in incus delete and incus image delete.

I think the relevant commands should be:

  • incus cluster group delete
  • incus file delete
  • incus image alias delete
  • incus network delete
  • incus network acl delete
  • incus network address-set delete
  • incus network integration delete
  • incus network zone delete
  • incus operation delete
  • incus profile delete
  • incus project delete
  • incus storage delete
  • incus warning delete

stgraber avatar Nov 13 '25 16:11 stgraber