Thursday, November 21, 2024

Freeing up Disk Space when using Docker

 Turns out there's a lot of temporary data that is used by Docker. To clean it up, try the following (courtesy Mr Davron):

  1. Open an elevated Powershell or CMD prompt
  2. `docker system prune --all`
  3. Right mouse click on docker desktop in system tray -> quit
  4. `wsl --shutdown`
  5. `Optimize-VHD -Path "$env:LOCALAPPDATA\Docker\wsl\data\ext4.vhdx" -Mode Full`
  6. Reboot
This freed up about 25GB on my machine.

No comments:

Post a Comment