docker system prune



--all
--volumes


examples/volumes/docker-compose.yml
version: '3.7'
services:
  box:
    image: ubuntu:latest
    volumes:
        - .:/localdir
        - my-data:/mydata
    entrypoint:
        - tail
        - -f
        - /dev/null


volumes:
  my-data: