Have you ever struggled with this (Docker taking up too much space)?
☠️ Just make sure the images or clusters you need are running before executing these commands.
1. Clean Up Docker
This will delete all unused images, containers, and volumes (be careful, as it might remove important data):
docker system prune -a --volumes
2. Restart WSL (For Windows Users)
wsl --shutdown # Shutdown WSL
wsl # Restart WSL
Then, restart your PC to apply the changes.
Shrink WSL Disk Usage (optional )
wsl --shutdown
Optimize-VHD -Path C:\Users\{YourUser}\AppData\Local\Docker\wsl\data\ext4.vhdx -Mode Full
Hope this helps, my backend gangs!
#docker