The guix-package command is the tool that allows users to install, upgrade, and remove packages, as well as rolling back to previous configurations. It operates only on the user's own profile, and works with normal user privileges (see Features). Its syntax is:
guix-package options
Primarily, options specifies the operations to be performed during the transaction. Upon completion, a new profile is created, but previous generations of the profile remain available, should the user want to roll back.
For each user, a symlink to the user's default profile is automatically
created in $HOME/.guix-profile. This symlink always points to the
current generation of the user's default profile. Thus, users can add
$HOME/.guix-profile/bin to their PATH environment
variable, and so on.
In a multi-user setup, user profiles must be stored in a place
registered as a garbage-collector root, which
$HOME/.guix-profile points to (see Invoking guix-gc). That
directory is normally
localstatedir/profiles/per-user/user, where
localstatedir is the value passed to configure as
--localstatedir, and user is the user name. It must be
created by root, with user as the owner. When it does not
exist, guix-package emits an error about it.
The options can be among the following:
--install=package-i packagepackage may specify either a simple package name, such as
guile, or a package name followed by a hyphen and version number,
such as guile-1.8.8. In addition, package may contain a
colon, followed by the name of one of the outputs of the package, as in
gcc:doc or binutils-2.22:lib.
--remove=package-r package--upgrade=regexp-u regexp--roll-backWhen combined with options such as --install, roll back occurs
before any other actions.
--profile=profile-p profile--dry-run-n--verbose--bootstrapIn addition to these actions guix-package supports the following options to query the current state of a profile, or the availability of packages:
For each installed package, print the following items, separated by
tabs: the package name, its version string, the part of the package that
is installed (for instance, out for the default output,
include for its headers, etc.), and the path of this package in
the store.
For each package, print the following items separated by tabs: its name,
its version string, the parts of the package (out for the main
files, lib for libraries and possibly headers, etc.), and the
source location of its definition.