DOCKER-COMPOSE-RM(1)
π docker-compose-rm β bestie edition β¨
okay so the manual name is docker-compose-rm and it lives in the docker-compose-rm(1) section, if you were wondering π
πΈ NAME πΈ
docker-compose-rm β removes stopped service containers. yes, the actual name of the game. it takes out the trash ποΈβ¨
π¦ SYNOPSIS π¦
docker compose rm [OPTIONS] [SERVICE...]
that's it. that's the whole vibe. options optional, services optional, chaos optional π
π DESCRIPTION π
So. Removes stopped service containers. That's the whole job, and she does it well π
By default, anonymous volumes attached to containers are not removed. You can override this with -v. And if you wanna list all volumes, use docker volume ls. iykyk π«Ά
β οΈ Any data which is not in a volume is lost. Like, gone gone. not "in the recycle bin" gone. LOST. no cap, please be careful π
Running the command with no options also removes one-off containers created by docker compose run:
$ docker compose rm
Going to remove djangoquickstart_web_run_1
Are you sure? [yN] y
Removing djangoquickstart_web_run_1 ... done
look at her go, so efficient, so demure, so mindful π§
β¨ OPTIONS β¨
-f,--force[=false]β don't ask to confirm removal. she just does it. no questions, no hesitation, main character energy π-h,--help[=false]β help forrm. your little emotional support flag π₯Ί-s,--stop[=false]β stop the containers, if required, before removing. like, she'll tuck them in first before yeeting them π-v,--volumes[=false]β remove any anonymous volumes attached to containers. the override for that default behavior we mentioned up top π
π OPTIONS INHERITED FROM PARENT COMMANDS π
--dry-run[=false]β execute command in dry run mode. a little rehearsal, a little dress rehearsal, nothing actually happens π
π₯ SEE ALSO π₯
kay so that's the whole page, you ate that, go forth and clean up your stopped containers responsibly bestie π
this lil masterpiece is from Mar 2025, filed under DOCKER-COMPOSE-RM(1) β mwah, periodt π
β¨
π¦ where this page comes from
- debian trixie: docker-compose 2.26.1-4 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms