Compose down normally removes service containers and networks, not named volumes. The --volumes option changes that behavior. Data can also appear missing because a later run attached a different volume or because the data lived only in the old container writable layer.
Inspect the boundary before changing the service
The commands below use placeholder names. They illustrate a diagnostic workflow and were not run against a live container in this review. Match the Docker context and project before inspecting your own service.
# Read-only inventory for the actual project:
docker compose ls
docker volume ls
docker inspect demo --format '{{json .Mounts}}'
docker volume inspect project_data
# Names are placeholders. Do not run down -v as a diagnostic.What to compare
Distinguish a mount destination such as /var/lib/example from the storage object supplying it. A project-name change can produce a different Compose-managed named volume even when the service and mount destination look unchanged. Anonymous volumes have no stable user-selected name and are not automatically reattached by a later up. A directory written only in a container filesystem has a different retention boundary from either volume type.
Choose the next action
Preserve the current state and list candidate volumes before creating or deleting anything. Compare labels, creation times and expected owner project, then check the application configuration for its actual data directory. Keep an independent backup and validate the restore on a separate disposable target before pointing production at a suspected old volume. If an external volume is part of the design, record its explicit name and ownership outside the Compose lifecycle. A bind mount is not a Compose-managed volume object: down does not itself delete the host directory supplying a bind mount. Investigate application writes and the actual path separately if that directory changed.
Limits and verification
Docker documents that external networks and volumes are not removed by Compose down. That does not protect them from other deletion commands or establish that a backup exists. This guide does not recommend mounting arbitrary database storage into a running second database process. No volumes were read, modified or removed during this review; the next action depends on the real inventory and recovery policy.
Related: Files Disappear Under a Docker Bind Mount: Compare Image Content and Host Source.
Official Docker documentation checked November 10, 2026 (KST). Docker Compose 2.35.1 configuration parsing was available, but the Docker daemon was not running. These pages do not claim a live container connectivity, storage, health or recovery test.