Skip to content

fix: down does not remove networks or named volumes #77

@Jaro-c

Description

@Jaro-c

Problem

engine/lifecycle.rs down_with_options removes containers but never:

  1. LIFE-001: Removes non-external networks declared in the compose file. Over time this exhausts the host's network namespace limit.
  2. LIFE-002: Removes named volumes even when --volumes (remove_volumes=true) is passed. Named volumes accumulate indefinitely.

Fix

After all containers are removed in down_with_options:

  1. Iterate file.networks, skip external, remove each non-external network by its resolved name (ignore 404).
  2. When remove_volumes, iterate file.volumes, skip external, remove each non-external volume by its resolved name (ignore 404).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions