Search code examples
nixnixos

How to undo `nix-channel --update`


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?


Solution

  • 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.