WARNING: there isn't enough free space in temp drive C to process Ubuntu-20.04.
There are only 10259 MB available.
Please, change the TEMP folder to a drive with at least 0 MB of free space.
You cand do it by typing $env:TEMP="Z:/your/new/temp/folder" before using wslcompact.
So I followed the instructions:
$env:TEMP="d:\wsltmp"
Then I started getting:
Current size: 36260 MB
Estimated size: 15537 +/- 379 MB
The estimated process time using an SSD is about 4 minutes.
Method invocation failed because [System.Object[]] does not contain a method named 'op_Division'.
At C:\Users\Rawiri.Blundell\[redacted]\WindowsPowerShell\Modules\WslCompact\WslCompact.psm1:85 char:17
+ if (($estimated * $sf) -lt ($freedisk / 1MB)) {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (op_Division:String) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
Following the code, we have this line:
$freedisk = (Get-PSDrive $env:TEMP[0]).free
If I follow that manually, I get two results:
Get-PSDrive $env:TEMP[0]
Name Used (GB) Free (GB) Provider Root CurrentLocation
---- --------- --------- -------- ---- ---------------
D 16.44 41.28 FileSystem D:\
d 16.44 41.28 FileSystem d:\
(Get-PSDrive $env:TEMP[0]).free
44320555008
44320555008
I don't know if this is normal behaviour for PowerShell.
On first run of
wslcompact
, I encountered:So I followed the instructions:
Then I started getting:
Following the code, we have this line:
If I follow that manually, I get two results:
I don't know if this is normal behaviour for PowerShell.
Setting the
$freedisk
assignment to this:Allows the process to continue, but I'm not sure if that's necessarily the best solution.