lix/src/nix/profile-upgrade.md
Qyriad e98fc952a8 nix3-profile: remove indices
Based off of commit 3187bc9ac3dd193b9329ef68c73ac3cca794ed78

Upstream-PR: https://github.com/NixOS/nix/pull/9656
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
Change-Id: I8ac4a33314cd1cf9de95404c20f58e883460acc7
2024-05-02 12:02:28 -06:00

820 B

R""(

Examples

  • Upgrade all packages that were installed using an unlocked flake reference:

    # nix profile upgrade '.*'
    
  • Upgrade a specific package by name:

    # nix profile upgrade hello
    
    # nix profile upgrade packages.x86_64-linux.hello
    

Description

This command upgrades a previously installed package in a Nix profile, by fetching and evaluating the latest version of the flake from which the package was installed.

Warning

This only works if you used an unlocked flake reference at installation time, e.g. nixpkgs#hello. It does not work if you used a locked flake reference (e.g. github:NixOS/nixpkgs/13d0c311e3ae923a00f734b43fd1d35b47d8943a#hello), since in that case the "latest version" is always the same.

)""