Your system generations are under /nix/var/nix/profiles.

You can `rm -i $(cd /nix/var/nix/profiles; ls *-link -1dtr | head -n -<# of versions to to keep> | grep -v $(readlink system) | xargs realpath -s)` :-)

and then do a normal gc.

-- Layus.

On 30/03/17 15:42, Azul wrote:

Hi there,

I would like to cleanup my oldest  'n' nix generations.

nix-collect-garbage seems to only provide me with a older than 'n' days option.

Any quick hacks to clean everything but keep my recent  'n' generations ?




_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to