2025-05-08 12:26:01 -06:00
|
|
|
# nix profile
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
> Install, update, and remove packages from Nix profiles.
|
|
|
|
|
> More information: <https://nix.dev/manual/nix/latest/command-ref/new-cli/nix3-profile.html>.
|
2025-05-08 12:26:01 -06:00
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- Install packages from nixpkgs into the default profile:
|
2025-05-08 12:26:01 -06:00
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`nix profile add {{nixpkgs#pkg1 nixpkgs#pkg2 ...}}`
|
2025-05-08 12:26:01 -06:00
|
|
|
|
|
|
|
|
- Install a package from a flake on GitHub into a custom profile:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`nix profile add {{github:owner/repo/pkg}} --profile {{path/to/directory}}`
|
2025-05-08 12:26:01 -06:00
|
|
|
|
|
|
|
|
- List packages currently installed in the default profile:
|
|
|
|
|
|
|
|
|
|
`nix profile list`
|
|
|
|
|
|
|
|
|
|
- Remove a package installed from nixpkgs from the default profile, by name:
|
|
|
|
|
|
|
|
|
|
`nix profile remove {{legacyPackages.x86_64-linux.pkg}}`
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- Upgrade packages in the default profile to the latest available versions:
|
2025-05-08 12:26:01 -06:00
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`nix profile upgrade --all`
|
2025-05-08 12:26:01 -06:00
|
|
|
|
|
|
|
|
- Rollback (cancel) the latest action on the default profile:
|
|
|
|
|
|
|
|
|
|
`nix profile rollback`
|