Skip to content

[Bug]: container network delete --all tries to delete default network. #1073

Description

@jglogan

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

container network delete --all

Current behavior

% container network delete --all
Warning! Running debug build. Performance may be degraded.
failed to delete network default: invalidArgument: "cannot delete system subnet default"
Error: internalError: "delete failed for one or more networks: ["default"]"

Expected behavior

  1. container network delete --all prints any deleted resources to stdout, like any resource delete command.
  2. The operation does not try to delete system-owned resources, such as the default network.

Preferably, the implementation would transition us from using hardcoded names to labels, so that it's easier to reason about resources regardless of resource type. We could use a com.apple.container.something label key that indicates a system managed resource that should be filtered out of delete commands.

Environment

- OS: 26
- Xcode: 26
- Container: main

Relevant log output

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    networkIssues and features associated with networking and DNS.uxUser experience features and fixes.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions