Have tried the following commands, but none of them delete the images.
sudo docker images prune --filter "dangling=true"
sudo docker images prune --all
sudo docker images prune -a
sudo docker images prune
Output for both the commands:
REPOSITORY TAG IMAGE ID CREATED SIZE
Docker version:
$ sudo docker version
Client:
Version: 1.12.6
API version: 1.24
Go version: go1.6.4
Git commit: 78d1802
Built: Tue Jan 10 20:26:30 2017
OS/Arch: linux/amd64
Server:
Version: 1.12.6
API version: 1.24
Go version: go1.6.4
Git commit: 78d1802
Built: Tue Jan 10 20:26:30 2017
OS/Arch: linux/amd64
Docker doc suggests this command, but I encountered error
$ sudo docker image prune -a
docker: 'image' is not a docker command.
See 'docker --help'.`