nix-community / linuxkit-nix

An easy to use Linux builder for macOS [maintainer=@nicknovitski]
Other
133 stars 26 forks source link

how to run garbage collection on linuxkit-builder? #34

Closed adrian-gierakowski closed 4 years ago

adrian-gierakowski commented 4 years ago

I've been using linuxkit for a while and it has been working great, however I've noticed that the following file /Users/myusername/.cache/nix-linuxkit-builder/nix-disk has grown to over 80 GB. Running nix-collect-garbage doesn't reduce the size of this file. How could I reduces it's size? Should I just nuke the whole thing? Thanks!

puffnfresh commented 4 years ago

Nuking the whole thing should work but will require some rebuilds, if you don't mind waiting.

adrian-gierakowski commented 4 years ago

Thanks @puffnfresh

for anyone stumbling upon this in the future: looks like the nix-disk file didn't really grow to this size, but it was like that since the start. After running:

rm -rf ~/.cache/nix-linuxkit-builder/
nix-linuxkit-configure

the file was recreated with exactly the tame size, so nuking it is only an option if you don't intend to use linuxkit-builder anymore

adrian-gierakowski commented 4 years ago

however if you run out of space on the builder, then ssh nix-linuxkit nix-collect-garbage should do the trick