sudo docker system prune -a
- 删除docker 的image、container、volume
I have found a work-around in the meantime. It’s a little tedious, but it clears up space on my Ubuntu 16.04 VM. Essentially… performing a “double-tap” on the system. Running as root or any system sudoer:
docker rm $(docker ps -a -q) docker rmi --force $(docker images -q) docker system prune --force # Double-tap systemctl stop docker rm -rf /var/lib/docker/aufs apt-get autoclean apt-get autoremove systemctl start docker
Make sure you’re not cd’d into your /var/lib/docker/aufs directory when running these commands.
It did work for me running inside /var/lib/docker/.
Just for sanity’s sake, check your docker service with sudo systemctl docker status
verify the /var/lib/docker/aufs directory is empty with ls /var/lib/docker/aufs/.
If nothing returns, it has been emptied!
Lastly, check your system’s storage space with df. Happy times!