← 返回命令列表

Linux command

nix-profile 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

List installed packages

nix profile list

Install package

nix profile install [nixpkgs#hello]

Remove package

nix profile remove [hello]

Upgrade packages

nix profile upgrade '.*'

Rollback profile

nix profile rollback

说明

nix profile manages user package profiles in Nix. Modern replacement for nix-env. Installs, removes, and upgrades packages with atomic operations and rollback support.

参数

list
List installed packages.
install _package_
Install package.
remove _package_
Remove package.
upgrade _regex_
Upgrade matching packages.
rollback
Rollback to previous generation.
history
Show profile history.
diff-closures
Show changes between generations.

FAQ

What is the nix-profile command used for?

nix profile manages user package profiles in Nix. Modern replacement for nix-env. Installs, removes, and upgrades packages with atomic operations and rollback support.

How do I run a basic nix-profile example?

Run `nix profile list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does list do in nix-profile?

List installed packages.