# okibcn/wslcompact

Compacts the size of the ever-growing WSL vhdx images.

Repository: https://github.com/okibcn/wslcompact
Canonical: https://ross.abutalabs.com/products/wslcompact
Homepage: https://github.com/okibcn/wslcompact
Language: PowerShell
License: GPL-3.0
License Family: copyleft
Topics: linux, size-optimization, vhdx, virtual-machine, windows, wsl, wsl2
Last push: 2026-03-10T23:55:39+00:00

## Health v2 (maintenance only)
Score: 53/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 71, release rhythm 8, longevity 93
- inputs: {"age_days": 1312, "days_push": 176, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1174, forks 29 (observed 2026-08-28T04:03:52.355562+00:00)

## What it is
A PowerShell CLI utility that safely compacts the ever-growing VHDX disk images used by WSL2 Linux distros, shrinking them to minimal size without requiring elevated credentials. It runs in info mode by default, showing current size, estimated compacted size, and processing time before any action.

## Use cases
- shrink WSL2 vhdx image after deleting files
- reclaim disk space from Ubuntu WSL distro
- compact all installed WSL distro images
- check how much space a WSL image can save
- reduce ext4.vhdx file size on Windows

## When to choose
- you use WSL2 on Windows and vhdx images keep growing
- you want a safe, no-admin-rights compaction tool with dry-run info mode

## When to avoid
- you use WSL1 or non-Windows platforms
- you need general-purpose disk or VM image compaction beyond WSL vhdx

## Facets
- artifact type: cli-tool
- maturity: active
- function: cli, compression, file-system, developer-tools
- domain: developer-tools, windows
- platform: windows, cli
- tags: wsl, wsl2, vhdx, disk-cleanup, powershell, virtual-machine, virtualization

## Member repositories
- okibcn/wslcompact (main) score 53

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:52.355562+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:28:18.436398+00:00, confidence not recorded.
  - readme: https://github.com/okibcn/wslcompact (fetched 2026-08-28T04:03:52.355562+00:00, sha 338a40c5ea52)
  - homepage: https://github.com/okibcn/wslcompact (fetched 2026-08-29T12:33:22.212533+00:00, sha c10aa43b0b5d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
