Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to undo `nix-channel --update`

Tags:

nix

nixos

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?

like image 346
danbst Avatar asked Aug 22 '16 23:08

danbst


People also ask

How do I check my Nix-channel?

To see the list of official NixOS channels, visit https://nixos.org/channels. Adds a channel named name with URL url to the list of subscribed channels. If name is omitted, it defaults to the last component of url, with the suffixes -stable or -unstable removed.

Is NixOS rolling release?

New stable channels are released every six months. Unstable channels ( nixos-unstable , nixpkgs-unstable ) correspond to the main development branch (master) of Nixpkgs, delivering the latest tested updates on a rolling basis.

How do I upgrade NixOS?

The best way to keep your NixOS installation up to date is to use one of the NixOS channels. A channel is a Nix mechanism for distributing Nix expressions and associated binaries. The NixOS channels are updated automatically from NixOS's Git repository after certain tests have passed and all packages have been built.


1 Answers

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.

like image 153
Evan VanderZee Avatar answered Sep 17 '22 04:09

Evan VanderZee