]> git.scottworley.com Git - auto-upgrade-with-pinch/commit
Remove comment musing about nix-env --upgrade
authorScott Worley <scottworley@scottworley.com>
Sun, 2 Aug 2026 00:55:33 +0000 (17:55 -0700)
committerScott Worley <scottworley@scottworley.com>
Sun, 2 Aug 2026 00:55:33 +0000 (17:55 -0700)
commit17218fba8e1f573bbeb73b9ddf1a884becd834a6
tree42b646fa49aeceabab4a37b1fea618fbad814170
parent4fa1f9a93369f086f2d8c1635f5550932f056ccc
Remove comment musing about nix-env --upgrade

`nix-env --ugpgrade` is very broken:

* It requires that all channels are interpretable as environments.  This
  usually means creating a `default.nix` with just `{}` in it to keep
  getAllExprs() in nix/src/nix-env/nix-env.cc from recursing around
  looking for packages.

* It fails when otherwise-unused packages have evaluation errors.

* It evaluates all ~100,000 packages in nixpkgs.  This is very slow and
  requires ~12 GiB of RAM.

* It only does updates when the top-level packages in `manifest.nix`
  have version numbers that go up.

  * So packages inside an unversioned `buildEnv` just never get updated.
    Using a single `buildEnv` that is the list of packages you want is
    the standard, recommended way to use `nix-env`.

* A `nix-env --upgrade` after `nix-env --set` will uninstall everything.
upgrade-config.nix