Section: Volumes and Mounts

Remove volume

bash
bash
docker volume rm pgdata
Explanation

Will fail if the volume is still attached unless forced by removing containers first.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Volumes and Mounts
Remove an image
Delete a local image.
OpenIn sheetbash2 tag match
Force remove an image
Force-remove a local image.
OpenIn sheetbash2 tag match
Remove a stopped container
Remove one or more stopped containers.
OpenIn sheetbash2 tag match
Force remove a running container
Force-remove a running container.
OpenIn sheetbash2 tag match
Prune dangling images
Remove dangling images.
OpenIn sheetbash1 tag match
Run and remove on exit
Automatically remove the container after it exits.
OpenIn sheetbash1 tag match