Presentation in Github #1
okibcn
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
WSLCOMPACT
Compacts the size of the WSL images by removing unused empty space.
FEATURES
The Windows Subsystem for Linux (WSL) uses VHDX image files to store the ext4 filesystem, but it lacks an effective way to shrink the image when the files are removed. This utility compacts the vhdx virtual images of the WSL2 distros. It achieves the minimum possible size. The program provides the following info for each installed distro:
By default it will perform in compact mode. and if no distro is specified, it will compact all the installed images sequentially providing also the info about the resulting compacted size.
INSTALLATION
The easier way to install nano is by using Scoop package manager.
To remove the app just type:
> scoop uninstall wslcompact
USAGE
The usage is straightforward. Calling
wslcompact
without arguments compacts all the WSL images. Or you can compact a single one passing its name as an argument, for instancewslcompact Ubuntu
. It ensures a minimal size and you end up with contiguous files for faster access in old HD-based systems. The list of names of the installed distros is accessible by typingwsl -l
in any powershell terminal. with the-i
info mode, it wont compact the images providing only the info.if your C: drive doesn't have enough temporal free space, the program won't compact that distro. Just change the TEMP folder before calling the function. So, instead of a simple
wslcompact
, just do:The new TEMP folder will be active only for that PowerShell terminal session, so no problem at all for the rest of the system and it won't leave garbage.
Beta Was this translation helpful? Give feedback.
All reactions