my Win10 instance have like 30GBs of file occupied by Docker Images, this is how i clean them.
First, remove the whole images
docker system prune -a --filter label!=do-not-remove
Then stop Docker, and run below command from PowerShell (dont forget to run this as Administrator
)
Mount-VHD -Path "C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx" -ReadOnly
Optimize-VHD -Path "C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx" -Mode Full
Dismount-VHD -Path "C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx