I’ve been playing around with the nix profile
subcommand, which as I understand it is the replacement to nix-env
more or less. It seems very nice, but I was wondering what will be the new-style replacement for nix-collect-garbage
, which according to its documentation will do something akin to nix-env --delete-generations
with some extra arguments when given the --delete-old
flag. It seems that this functionality is now in nix profile wipe-history
, but i was wondering if there is a nice way (like nix-collect-garbage
) to use this command to wipe part of my system profiles.
Right now, I think sudo nix profile wipe-history --profile /nix/var/nix/profiles/system
would work, since running it as a dry run listed the old generations, but I was wondering if
a) this is indeed equivalent (I understand it isn’t going to do the garbage collection part, but nix store gc
seems to work well for that)
b) there isn’t some flag or other command that choses this profile by default. If not, are there plans to make one.
Thank you!