Windows Maintenance
Rebuild Icon Cache
Open a command prompt:
TaskKill /f /im explorer.exe
DEL /F "%LocalAppData%\Microsoft\Windows\Explorer\*Cache*.db"
DEL /F "%LocalAppData%\IconCache.db"
explorer.exe
Alternatively:
ie4uinit.exe -show
Freeing Space
You can compact / free up WSL virtual hdd with the following:
wsl --manage docker-desktop
docker image prune -a # Prune all images that aren't in use by any containers
docker container prune
docker volume prune
Deployment Image Servicing and Management tool (DISM)
DISM can be used to mount and service a Windows image from a .wim file, .vhd file, or a .vhdx file or, in some cases, to update a running operating system.
You can use DISM to do various cleanup operations related to installed components, updates and service packs.
Remove Service Pack backup components after Service Pack installation
After installing a Service Pack, you can clean up backed up components:
dism /online /cleanup-image /spsuperseded /hidesp
Note this will make it impossible to uninstall the service pack.
Remove all superceded components
dism /online /Cleanup-Image /StartComponentCleanup /ResetBase
This will clean up updates and service pack components, but mean you cannot uninstall Service Packs or installed Windows Updates.
Reference: https://blog.brankovucinec.com/2014/11/06/use-dism-to-cleanup-winsxs-after-windows-update/