The Windows utility diskpart can now be used to shrink Virtual Hard Disk (vhdx) files that is used to store Windows Subsystem for Linux (WSL). I am putting the list of the instructions below. First make sure all WSL instances are shut down by opening an administrator command window, and typing: