Skip to content

compose: add --all flag to down for full cleanup#13685

Open
sarika-03 wants to merge 1 commit intodocker:mainfrom
sarika-03:branch
Open

compose: add --all flag to down for full cleanup#13685
sarika-03 wants to merge 1 commit intodocker:mainfrom
sarika-03:branch

Conversation

@sarika-03
Copy link
Copy Markdown

@sarika-03 sarika-03 commented Mar 29, 2026

What I did

Added a new --all flag to docker compose down so users can fully clean up a Compose project, including resources created under inactive profiles.

Changes included

  • added --all to docker compose down
  • made down --all load the project with all profiles enabled
  • made down --all include orphan containers automatically
  • ensured associated networks and volumes are also cleaned up
  • added unit and e2e coverage for inactive-profile cleanup
  • updated down command help and docs

Manual verification

  • reproduced the bug with a profiled service (bar)
  • docker compose down -v -t 0 --remove-orphans left the profiled container, network, and volume behind
  • docker compose down --all -v -t 0 removed all remaining project resources

Related issue

Fixes #13647
Related to #13027

Screenshot from 2026-03-29 14-50-26

Cute animal 🐳

Screenshot from 2026-03-29 14-58-51

Signed-off-by: sarika-03 <sarikasharma9711@gmail.com>
@sarika-03 sarika-03 requested a review from a team as a code owner March 29, 2026 09:27
@sarika-03 sarika-03 requested review from glours and ndeloof March 29, 2026 09:27
@sarika-03
Copy link
Copy Markdown
Author

@ndeloof @glours
please review my PR

@ndeloof
Copy link
Copy Markdown
Contributor

ndeloof commented Mar 29, 2026

using --profile=* already offers this feature

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.

[Feature] "down --all" to include all containers regardless of active profiles.

2 participants