{"repo":"hyperphantasia/WSL-VHDX-Compact","free":true,"listed":false,"github":"https://github.com/hyperphantasia/WSL-VHDX-Compact","clone":"git clone https://github.com/hyperphantasia/WSL-VHDX-Compact.git","description":"Free up space (effortlessly) on WSL2 with VHDX Compaction.","language":"PowerShell","stars":112,"topics":["disk-space","diskpart","powershell","vhdx","wsl","wsl-environment","wsl2","disk-management","ext4","storage-management"],"license":"Unlicense","category":"workflow-automation","readme_excerpt":"WSL2 ext4.vhdx compactor ♫ Garbage - Only Happy When It Rains (1995) ♪ . Declutter your WSL - the easy way. (Photograph by Gerald Herbert/AP) Description This PowerShell script automates the process of compacting WSL2 ext4.vhdx files, which can help free up a lot of disk space on your Windows system. Learning [!NOTE] The initial release is the subject of a tutorial designed as a practical introduction to PowerShell. It is available on fCC News. Table of contents Contents - click to expand - WSL2 ext4.vhdx compactor - Description - Learning - Table of contents - Why? - The big issue - Benefits - Screenshot - Requirements - Usage - The executable - PowerShell gallery - The Windows .exe - Verifying your download - Code signing - Algorithm - Notes - Exit codes & errors - Misc - Compatibility - Changelog - July 2026 - Latest - May 2026 - April & May 2026 - August 2025 - Contributing - License Why? Windows Subsystem for Linux (WSL 2) uses a virtualization platform to install Linux distributions alongside the host Windows operating system. For that, it creates a Virtual Hard Disk (VHD) to store files for each of the Linux distributions that you install. These VHDs use the ext4 file system type and are represented on your Windows hard drive as an ext4.vhdx file. WSL 2 automatically resizes these VHD files to meet storage needs. This means that the VHD file starts small and grows as needed. Initially, it may only take up a few gigabytes, but as you install applications and create file","default_branch":null,"files":null,"tree":[],"storefront":"/r/hyperphantasia","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/hyperphantasia/WSL-VHDX-Compact/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}