After clean installation via NixOps, I logined to machine and executed
# nix-channel --update
This pulled ~130Mb of nixpkgs into my /nix/store
. How can I undo this?
After clean installation via NixOps, I logined to machine and executed
# nix-channel --update
This pulled ~130Mb of nixpkgs into my /nix/store
. How can I undo this?
On a normal Nix or NixOS install, if you've updated your channels by accident with nix-channel --update
, you can undo this by running
nix-channel --rollback
See the manual for more details.
On a NixOps installation, channels are configured but not actually used. See the other answer for that.
On a NixOps installation it seems that channels are configured, but aren't actually used by NixOps. This means that running nix-channel --update
will create the very first generation, and nix-channel --rollback
won't work as that can't roll back past the first generation.
The following seems to work for clearing out this information.
Do not run this on a Nix or NixOS install! This is just for NixOps.
rm /nix/var/nix/profiles/per-user/root/channels-1-link
rm /nix/var/nix/profiles/per-user/root/channels
rm ~/.nix-defexpr/channels
nix-collect-garbage -d