nix quick reference
Written 2016-09-25
Intro
Nix is a package manager, noteworthy for... well, a lot of things; it's a functional package manager with a rather beautiful mixture between source and binary packaging, used as the basis for NixOS but capable of running on other UNIX-likes as a secondary package manager. I most enjoy this last point; it's nice to have a secondary package manager that's independent of the host system.
Note that this page assumes you have a general understanding of Nix but need a reminder of exact commands.
Commands
Show installed packages:
nix-env -q
Search available packages:
nix-env -qa | grep space
Install a package:
nix-env -i spacefm
Uninstall a package:
nix-env -e spacefm
Update all packages:
nix-channel --update
nix-env -u --keep-going
Garbage collect:
nix-env --delete-generations old
nix-collect-garbage
Further reading:
Official Docs:
NixOS wiki: Install/Remove Software
Random blogger: