• 0 Posts
  • 1 Comment
Joined 2 years ago
cake
Cake day: August 4th, 2023

help-circle
  • Did you run garbage collection?

    Just in case you (understandably) missed this concept “deleting” a generation does not remove package files from the nix store, they are just no longer referenced by the environment of your new configuration. Garbage collection (GC) can be run manually or set to run periodically to actually remove unreferenced files from the nix store. This is pretty nice when iterating on some package as you can make a change, rebuild, then if you change your mind instantly go back to some prior version without rebuilding or redownloading dependencies, and just let GC clean up for you later.

    If you’re on a system where you’re really worried about disk space down to the relatively small size that extra package versions might use maybe nixos isn’t the best choice. One could setup and build the configuration for a disk space constrained system on another larger system, though the nix learning curve is steep enough without navigating the multiple ways to do that while learning.

    OTOH, it might be that some other package in your config, possibly nix itself, depends on git (to get the packages) and that’s what you’re seeing in the store. This version should not interfere with anything in your user environment, e.g. if you want to install some alternative version of git or something (I don’t know why you want to remove git).