Freeing up disk space on Ubuntu VM

Check filesystem sizes

Check the filesystem size and available space.

$ df -H

Remove unused packages

Remove stray packages that were installed as dependencies of other packages that have since been removed.

$ sudo apt-get autoremove

Remove unused docker images

Remove all dangling images

$ docker image prune


Remove all unused images, not just dangling ones

$ docker image prune -a