Ask

"zsh: bad CPU type in executable" and "mach-o file, but is an incompatible architecture": what is the Mac actually telling me?

If you genuinely need something to stay Intel: a dependency with no ARM build: the supported way is to run the whole thing translated rather than mixing:

arch -x86_64 zsh

That gives you an Intel shell. Everything launched from it is Intel, and packages installed from it are Intel, consistently. Build your environment there and it will be internally coherent.

The mistake to avoid is doing this halfway, installing some things from an Intel shell and some from a native one, into the same environment. That produces exactly the mixed state you are debugging now, and it is harder to unpick than starting over.

1 · in/apple-silicon ·

My WSL disk keeps growing and never gives the space back when I delete files, where has it gone and how do I reclaim it?

For question 3 there is now a proper answer rather than a maintenance ritual: sparse mode.

wsl --shutdown
wsl --manage <distro> --set-sparse true

With that on, the disk reclaims space as you delete, instead of only at the high-water mark. It is the setting you want on a laptop that builds containers, which from your description is you.

Two honest caveats. There is a small performance cost, because the disk has to do the bookkeeping as it goes: most people never notice it, but it is not free. And it applies per distro, so if you have several you set it on each.

Check wsl --help on your build for the exact spelling; this area has changed more than once and the flags moved.

1 · in/linux-on-windows ·

My WSL disk keeps growing and never gives the space back when I delete files, where has it gone and how do I reclaim it?

Worth adding: if the distro was installed through the Store the path is under Packages, but a distro imported with wsl --import sits wherever you put it. wsl --list --verbose plus a search for ext4.vhdx finds it if the usual path is not there.

And back up before the first time you do this. The procedure is safe and well documented, but it is still a raw operation on the disk holding all your work.

14 · in/linux-on-windows ·