guix-package
Install, remove, and manage software packages
TLDR
Install a new package
Remove a package
Search the package database for a regular expression
List installed packages
List generations
Roll back to the previous generation
SYNOPSIS
guix package [options] [package-name...]
PARAMETERS
-i, --install=PACKAGE...
Install the specified PACKAGE(s). PACKAGE can be a package name, a derivation file, or a URL to a derivation file.
-u, --upgrade
Upgrade all installed packages.
-r, --remove=PACKAGE...
Remove the specified PACKAGE(s).
--list-installed
List installed packages.
-A, --available
List available packages.
--roll-back
Roll back to the previous generation of installed packages.
--profile=PROFILE
Operate on the given PROFILE instead of the default profile.
--manifest=FILE
Install the packages listed in FILE as a manifest. FILE must be a valid Guix manifest file.
--dry-run
Show what would happen without actually modifying the system.
--no-substitutes
Disable the use of substitutes. Build everything from source.
--version
Display version information and exit.
--help
Display help message and exit.
DESCRIPTION
The `guix package` command is the primary interface for managing software packages within the Guix System Distribution. It allows users to install, uninstall, upgrade, and otherwise manipulate software packages and dependencies. Unlike traditional package managers, Guix emphasizes reproducibility and declarative package management. Packages are defined in Guix's package collection (the 'package definitions'), which contain metadata about the package, including its dependencies, build instructions, and licenses. `guix package` can install packages from these definitions, binary substitutes, or directly from source code. It leverages transactional upgrades and rollbacks, ensuring that changes to the system are atomic and reversible.
The Guix store, typically located under `/gnu/store`, provides a content-addressed storage area for packages. This allows multiple versions of the same package to coexist on the system without conflict. The command offers a wide range of options, allowing users to precisely control the installation process, manage dependencies, and query the package database.
`guix package` is essential for creating reproducible software environments, building custom operating system images, and deploying software in a reliable and consistent manner. It's often used in conjunction with other Guix commands such as `guix build`, `guix environment`, and `guix system` to provide a complete software management solution.
CAVEATS
Modifying the system requires root privileges or the user to be part of the 'guixbuild' group. Using `--no-substitutes` can significantly increase build times.
PACKAGE IDENTIFIERS
Packages are identified by their name and potentially their version. Using `PACKAGE@VERSION` allows specifying a specific version of a package. If the version is not specified, the latest available version is used.
PROFILES
Guix uses profiles to manage sets of installed packages. The default profile is usually located at `~/.guix-profile`. Profiles can be used to create isolated environments for different projects or users.
HISTORY
Guix was created by Ludovic Courtès and others as a package manager and system distribution built on top of the Nix package manager. `guix package` is a core command within Guix, designed to provide a user-friendly interface for managing software packages while adhering to the principles of reproducibility and declarative configuration. The command has evolved over time, with features like transactional upgrades, rollbacks, and manifest-based installation being added to improve its usability and functionality. The adoption of Guix has grown within the free software community, particularly among those who value reproducible builds and complete control over their software environment.
SEE ALSO
guix build(1), guix environment(1), guix system(1)