Compact a WSL distro's virtual disk to reclaim unused storage space.
WSL's virtual disk grows when needed but doesn't shrink by itself. Here is how to reclaim the unused space. This can sometimes free hundreds of GBs for use on Windows.
| const puppeteer = require('puppeteer'); | |
| (async () => { | |
| const browser = await puppeteer.launch(); | |
| const page = await browser.newPage(); | |
| // Adjustments particular to this page to ensure we hit desktop breakpoint. | |
| page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1}); | |
| await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'}); |
| { | |
| "content_scripts": [ | |
| { | |
| "matches": ["http://*/*", "https://*/*"], | |
| "js": ["inject.js"], | |
| "all_frames": true | |
| } | |
| ], | |
| "web_accessible_resources": [ | |
| "content.js" |