Skip to content

[Request]: Storage - Add container prune command to remove stopped containers #892

Description

@realrajaryan

Feature or enhancement request details

Add a container prune subcommand to remove all stopped containers.

Basic requirements:

  • Remove all containers in stopped state
  • Display list of removed container IDs
  • Show reclaimed disk space using ByteCountFormatter
  • Trigger fstrim after cleanup to reclaim disk space

Example output:

Pruned containers:
abc123def456
789ghi012jkl

Reclaimed 2.4GB in disk space

Code of Conduct

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

Activity

  1. added
    facet/storage
    on Nov 17, 2025
  2. tico88612 commented on Nov 18, 2025

    @tico88612
    Contributor

    I will try this one.

  3. tico88612 commented on Nov 22, 2025

    @tico88612
    Contributor

    #904 for this issue

  4. cskeeters commented on Nov 22, 2025

    @cskeeters

    In the meantime:

    container list --all | grep stopped | \
        awk '{print $1}' | xargs -I {} container rm {}
  5. added a commit that references this issue on Jan 27, 2026
    24cbed5
  6. added a commit that references this issue on Feb 4, 2026
    8b79ec5
  7. added a commit that references this issue on Feb 18, 2026
    61c0378
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    facet/storagegood-first-issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions