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.
By Obbe Vermeij
What life was like inside Rockstar North.
Original source: insiderockstarnorth.blogspot.com | Archive.org
Articles preserved as posted
# Backup WSL2 virtual disks using native functions and compress them using 7zip | |
## Will Presley, 2020 | |
## willpresley.com | |
#### http://mats.gardstad.se/matscodemix/2009/02/05/calling-7-zip-from-powershell/ | |
# Alias for 7-zip | |
if (-not (test-path "$env:ProgramFiles\7-Zip\7z.exe")) {throw "$env:ProgramFiles\7-Zip\7z.exe needed"} | |
set-alias sz "$env:ProgramFiles\7-Zip\7z.exe" | |
#### Alternative native PS 7-zip: https://www.sans.org/blog/powershell-7-zip-module-versus-compress-archive-with-encryption/ |
/* PrivateBin Bootstrap CSS Changes -- Will Presley -- https://gist.github.com/WillPresley/159b1027010f88eb3e2b026c8c66756e */ | |
footer h4 small { display: none; } | |
#aboutbox { font-size: 12px; text-align: right; line-height: 1.15; } | |
@media (min-width: 992px) { #aboutbox { padding-left: 75px; } } | |
@media (min-width: 1280px) { #aboutbox { padding-left: 200px; padding-left: 12vw; } } |
/* Monitorr minimal - WillPresley fork - https://gist.github.com/WillPresley/b80072238c665ba1170e03cc092c0ab6 */ | |
body.embedded-view { | |
background: transparent !important; | |
margin-bottom: 0 !important; | |
} | |
body.embedded-view #footer {display:none !important;} | |
#headermin { | |
margin-top: 0; |
/* GLOBAL/Interface */ | |
.flux .item.website > a { margin-right: 10px; } | |
/* All Feeds */ | |
.content blockquote p { margin: 1em; } | |
/* Android Police */ | |
div[data-feed="3"] .content header, | |
div[data-feed="3"] .content header ~ div:first-of-type, | |
div[data-feed="3"] .content header ~ div:nth-last-child(3) { display: none; } |
# folders and files to be ignored by git | |
############ | |
## Bones | |
############ | |
Bones.esproj/ | |
############ | |
## IDEs |
@echo off | |
set "Server=192.168.50.125" | |
set "RetryCount=0" | |
:CheckServer | |
rem Ping server only once with a time limit of 1000 ms. | |
%SystemRoot%\System32\ping.exe -n 1 -w 1000 %Server% >nul | |
if not errorlevel 1 goto MapDrive | |
rem Connection to server is not yet established. Give up after 30 seconds |
Ten songs for each artist (if possible) UP TO and including St Paul & The Broken Bones. | |
Five each after that. | |
Missing entirely: | |
Colin Elmore & The Danville Train (see Youtube). | |
Could not get enough songs for 10 or 5 (accordingly): | |
5 more from Virtual Self | |
SuperJam (will add once leader is announced) | |
Grand Ole Opry (will add once details released) |
Verifying that +cryptecks is my blockchain ID. https://onename.com/cryptecks |