Shared server guidance · Question & answer

How do I find what Docker is using disk space for without deleting anything?

docker system df groups Docker-managed storage into images, containers, local volumes and build cache. Treat reclaimable estimates as candidates for review, not permission to delete. An unused-looking image or volume may be needed for recovery, a stopped workload or another project.

BeginnerLinux Docker Engine hosts
Go to the answer

Before you start

  • Authorised access to the intended Docker engine.

Instructions

1. Read summary and detailed usage

Start with the summary, then inspect details if a category needs investigation. Compare these totals with the filesystem’s available space because application bind mounts and some logs may need separate checks.

Remote Linux shell
docker system df
docker system df --verbose

Reports Docker-managed storage use without removing any objects.

2. Inspect stopped containers and writable layers

Map large writable layers to the owning application. Containers should not be used as an undocumented long-term store for important data.

Remote Linux shell
docker ps --all --size

Lists running and stopped containers with writable-layer size information.

3. Review ownership before cleanup

Identify which release, project or data set owns each candidate. Check retention and rollback requirements, then choose a separately approved targeted cleanup. Avoid a global prune command on a shared production host merely because it reports reclaimable bytes.

Check the result

  • The large storage category is identified and every proposed removal has a known owner and documented purpose.
  • Application data, active mounts and required rollback images remain accounted for.

Troubleshooting

The filesystem is full but Docker totals look smaller
Inspect container logs, bind-mounted application paths, other filesystem users and deleted-but-open files using the host’s storage diagnostics.
A volume has no current container reference
Confirm whether it belongs to a stopped, migrated or temporarily detached workload before treating it as disposable.

Official references

Use the documentation for your installed version when a flag, service name or platform feature differs.