On 17-03-30 02:42pm, 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 ?

Remove all system links from /nix/var/nix/profiles that you don’t want
    for i in $(seq 100 142); do rm "/nix/var/nix/profiles/system-$i-link"; done

Then perform a garbage collection
    nix-store --gc

This works for all kinds of profiles (e.g. the result link from nix-build).

-- 
Proudly written in Mutt with Vim on NixOS.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es
May take up to five days to read your message. If it’s urgent, call me.
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to