Skip to content

fix: show only running containers in force-delete prompt#1987

Open
xz-dev wants to merge 1 commit into89luca89:mainfrom
xz-dev:fix/rm-running-container-per-container-prompt
Open

fix: show only running containers in force-delete prompt#1987
xz-dev wants to merge 1 commit into89luca89:mainfrom
xz-dev:fix/rm-running-container-per-container-prompt

Conversation

@xz-dev
Copy link
Contributor

@xz-dev xz-dev commented Jan 29, 2026

Previously, when deleting multiple containers with distrobox-rm, if any container was running, the prompt incorrectly showed the entire container list instead of just the running containers.

This fix:

  • Collects all running container names first
  • Shows only running containers in the force-delete prompt
  • Asks once for all running containers (preserving original behavior)
  • If user refuses, continues without force flag (running containers will fail)
  • Exits on invalid input instead of continuing with deletion

Previously, when deleting multiple containers with `distrobox-rm`, if any
container was running, the prompt incorrectly showed the entire container
list instead of just the running containers.

This fix:
- Collects all running container names first
- Shows only running containers in the force-delete prompt
- Asks once for all running containers (preserving original behavior)
- If user refuses, continues without force flag (running containers will fail)
- Exits on invalid input instead of continuing with deletion

Signed-off-by: xz-dev <xiangzhedev@gmail.com>
@xz-dev xz-dev force-pushed the fix/rm-running-container-per-container-prompt branch from 31bf9b8 to 62d21d8 Compare January 29, 2026 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant