How to kill all nix builds?

Occasionally nixpkgs-review runs exceeds RAM, OOM kills some builds, exits, and leaves a bunch of zombie builds running that waste electrons.

How can I kill/stop all running nix builds?

Have you considered rebooting? Not ideal, but if the OOM killer is active you have no idea what it may kill.

sudo systemctl restart nix-daemon.service

(I think)

1 Like