Docker / Compose

Docker / Compose: docker compose down — Linux

Stop and remove project containers and networks.

Availability: Tool and version dependent; install separately where required.中文

Syntax

docker compose down

Examples

Stop and remove project containers and networks.

docker compose down

Parameters, options and clauses

docker compose down options and parameter descriptions
Option / clauseDescription
--remove-orphansRemove containers for services absent from the Compose file.
--rmi <local|all>Remove images created or used by the project.
-v, --volumesRemove named and anonymous volumes; this may permanently delete stored data.
-t, --timeout <seconds>Set the shutdown timeout before containers are killed.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory