2

I installed Ubuntu on a Windows system just to check what exactly WSL (Windows Subsystem for Linux) is.

After that I have disabled WSL and uninstalled Ubuntu.

But what I observed is I am not able to get back the 100GB of storage space allocated to Ubuntu while installing.

Is there a way to free up and recover that space?

1 Answer 1

2

100GB would be quite unusual for just "installing and uninstalling." A typical Ubuntu 20.04 installation on WSL2 is just over 1GB for the instance itself, and another 500MB for the installation (i.e. "App") files.

In my experience, uninstalling the Store App removes both the installation files as well as the instance itself, along with the virtual HDD (ext4.vhdx for WSL2) which contains the Ubuntu filesystem.

On Windows 11, there is also the WSLg System distribution (system.vhd) that is currently about 346MB. It is cloned in your user profile temp directory for each instance that is started, but those should also be cleaned up when WSL shuts down.

Since WSL is currently uninstalled, you can look for any of these files in PowerShell by starting an Administrator session and running:

Get-ChildItem -Path C:\ -Recurse -filter '*.vhd' -force -ErrorAction SilentlyContinue

This will find any stranded vhd or vhdx files.

But given the difference in sizes that you are seeing, my thought is that something else may be taking up that space.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .