Why nix profile install fails with "An existing package..."

Apologies in advance for the noob question (I didn’t find any answers).

I just installed nix along in my Ubuntu box (multi-user mode, the packages I use require flake, so I’m using that by default).

Now I’m trying to install my 3rd package (I only installed lolcat and nushell so far), and I’m getting an error that I’m not parsing:

$ nix profile install nixpkgs#ghostty
error: An existing package already provides the following file:

         /nix/store/7q8p6ix19ckhaqhnvi2ifxq0fvgz1dpz-ghostty-1.0.1-man/share/man/man5/ghostty.5.gz

       This is the conflicting file from the new package:

         /nix/store/7q8p6ix19ckhaqhnvi2ifxq0fvgz1dpz-ghostty-1.0.1-man/share/man/man5/ghostty.5.gz

...

But…:

  1. I don’t have ghostty installed.
  2. The package that “already provides” is the same it is trying to install. What is the point here?
  3. Although the commands it suggests don’t make sense to me (remove something not installed, used a different priority, since there are no installed packages), I tried them, with no success :frowning:

Any suggestions how to make it work ?

Or pointers of things I should understand ? – chances are I’m doing something dumb :slight_smile:

cheers and thanks in advance for any help!

i had the same issue - append ^out to the end of your command

i didn’t follow this change in nix too closely but if i had to guess i would think the command you used told nix to install all outputs and there are common files between outputs

maybe someone else can clarify this for us please

Thanks @aanderse!

It worked … or I should say, it installed, but it didnt’ work, since ghostty core dumps after it starts … alas but that has nothing to do with nix I supose.

What does this mysterious suffix “^out” do ? Or is there a link to documentation ?

https://nixos.org/manual/nixpkgs/stable/#chap-multiple-output

https://nix.dev/manual/nix/2.24/command-ref/new-cli/nix.html#derivation-output-selection

2 Likes