Skip to content

nix profiles upgrade and remove have counter-intuitive argument #7960

@bobvanderlinden

Description

@bobvanderlinden

Using upgrade and remove is counter intuitive. The following example shows what a user will likely presume to work:

$ nix profile install github:cachix/devenv/latest
$ nix profile upgrade github:cachix/devenv/latest
warning: 'github:cachix/devenv/latest' does not match any packages
warning: Use 'nix profile list' to see the current profile.
$ nix profile remove devenv
warning: 'devenv' does not match any packages
warning: Use 'nix profile list' to see the current profile.
  • The installable used in install is not applicable to remove nor upgrade.
  • The output shows warnings, but are actually errors. Nothing has changed to the profile.
  • nix profile list is suggested, but it isn't clear that you need to pick the index from that list.
  • The name of the installable (devenv) is not applicable to remove nor upgrade. Ideally the NAME is deferred from the flake patterns (github:OWNER/NAME/VERSION, github:OWNER/REPO/VERSION#NAME, nixpkgs#NAME, github:OWNER/NAME/VERSION#default).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugnew-cliRelating to the "nix" command

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions