SShortSingh.
Back to feed

How to manually shrink WSL2 virtual disk files and reclaim Windows storage

0
·1 views

WSL2 stores each Linux distribution inside a dynamically expanding virtual disk file (.vhdx) on the Windows C: drive, which grows automatically but never shrinks on its own even after files are deleted inside Linux. The freed space remains within the .vhdx container until the file is manually compacted, meaning Windows does not reclaim it automatically. To compact the disk, users must first fully shut down WSL2 using 'wsl --shutdown', then run the Optimize-VHD PowerShell command on Windows Pro or Enterprise, or use diskpart on Windows Home where Hyper-V is unavailable. For compaction to recover meaningful space, users should first clean up unused packages, logs, and Docker layers from within the Linux environment before shutting down and running the compaction process. Docker Desktop users face the same issue but their virtual disk resides in a separate folder, and the same manual compaction steps apply.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

AI Researchers Adapt Decision Transformers to Help Revive Endangered Heritage Languages

A researcher exploring offline reinforcement learning techniques discovered a potential application for Decision Transformers in heritage language preservation after a colleague working with the Cherokee Nation raised challenges around building tutoring systems for critically endangered languages. The core problem, termed 'extreme data sparsity,' involves languages with fewer than 2,000 fluent speakers, minimal digitized corpora, inconsistent orthography, and only a handful of elder speakers. Standard NLP approaches requiring 10,000-plus parallel sentences are impractical for languages like Ainu or Livonian, which have fewer than 30 fluent speakers worldwide. The proposed solution reframes language learning as a sequential decision-making problem, using Decision Transformers — originally developed by Chen et al. at UC Berkeley — to condition pedagogical decisions on target proficiency outcomes rather than relying on large training datasets. The research highlights both the technical and ethical complexities of deploying AI in culturally sensitive, resource-scarce linguistic communities.

0
ProgrammingDEV Community ·

Engineer Builds Metrics-First AI Resume System That Demands Numbers Before Rewriting

A software engineer published a technical framework on DEV Community showing why generic AI resume prompts produce vague, buzzword-heavy output. The core insight is that language models need quantitative data — before/after metrics, timeframes, and impact ratios — to generate meaningful resume improvements. The author built a structured Python pipeline using dataclasses to score every resume bullet across four dimensions: quantification strength, action verb specificity, temporal precision, and scale of impact. Only bullets that pass a deterministic scoring threshold are then passed to a large language model like GPT-4o for rewriting. The framework argues that the act of extracting real numbers from your own work history is itself more valuable than any AI-generated paraphrase.

0
ProgrammingDEV Community ·

OpenAI Launches Agents API in Public Beta, Replacing the Assistants API

OpenAI unveiled its Agents API at DevDay 2026, now available in public beta, which manages the core agent loop — including sessions, orchestration, context compaction, and error recovery — so developers no longer need to build it themselves. The API is built on the same managed infrastructure that powers Dots, OpenAI's own always-on agents announced at the event. It replaces the Assistants API, which was shut down in August, and becomes the primary stateful development path on OpenAI's platform. Developers can supply custom tools, choose from three execution environments, and build multi-turn agents using the Python SDK version 3.13.0 or later. During the beta period, there are no additional API fees beyond standard model and container usage rates, though data residency is currently limited to the US and Zero Data Retention is not supported.

0
ProgrammingDEV Community ·

Meta Ad Prices Fell for Seven Quarters Then Rose for Eleven, Earnings Data Shows

An analysis of Meta's quarterly earnings releases from Q4 2021 to Q2 2026 tracks year-over-year changes in average ad prices and impression volumes across Facebook, Instagram, Messenger, and WhatsApp. Ad prices declined every quarter from Q1 2022 through Q3 2023, hitting a low of minus 22% in Q4 2022, before recovering and rising consistently from Q4 2023 onward. By Q1 and Q2 2026, average price per ad was up 12% year over year, while ad impressions also grew in all 19 quarters without exception. Regional data available from Q1 2023 shows Asia-Pacific consistently recorded the fastest impression growth but the weakest price growth, while the US & Canada and Rest of World led on price gains in Q2 2026. Meta does not publish absolute CPM figures; these percentages, drawn directly from its investor relations materials, represent company-wide averages across all ad formats and objectives.

How to manually shrink WSL2 virtual disk files and reclaim Windows storage · ShortSingh