LinuxCommandLibrary

nix-classic

A classic, stable interface to a powerful package manager that makes package management reliable, reproducible, and declarative.

TLDR

Search for a package in nixpkgs via its name

$ nix-env -qaP [search_term_regexp]
copy


Start a shell with the specified packages available
$ nix-shell -p [pkg1 pkg2 pkg3...]
copy


Install some packages permanently
$ nix-env -iA [nixpkgs.pkg1 nixpkgs.pkg2...]
copy


Show all dependencies of a store path (package), in a tree format
$ nix-store --query --tree [/nix/store/...]
copy


Update the channels (repositories)
$ nix-channel --update
copy


Remove unused paths from Nix store
$ nix-collect-garbage
copy

Copied to clipboard