nix upgrade-nix failed to update on a profile lock file issue. #1054

Open
opened 2025-11-29 02:29:16 +00:00 by davidlenfesty · 0 comments

Describe the bug

When using the nix upgrade-nix from 1.93 to 1.94 as a user, it failed to apply the change to the profile. It failed on trying to remove the Lix 1.93 package from the profile, specifically it failed to open the profile lock in /nix/var/nix/profile/default, with a permissions error.

I have lost the original logs, I did not save them and I have worked around the issue by running the upgrade as root:

sudo -s
source /nix/var/nix/profile/default/etc/<something>.d/nix.sh
nix upgrade-nix

I have not tried to reproduce this in a VM yet but was asked to make the issue when I brought it up in the Matrix chat. I'll see if I can get around to trying to reproduce.

Steps To Reproduce

  1. Install Lix 1.93 on Ubuntu 22.04
  2. nix upgrade-nix

Expected behavior

It should have worked!

nix --version output

Lost it after I worked around the issue :(, upgrading from 1.93 -> 1.94 though.

Additional context

Ubuntu 22.04

Lix was installed through the online installer.

There is a chance I installed NixCpp first, then uninstalled it to replace with lix. I don't know if this is true.

## Describe the bug When using the `nix upgrade-nix` from 1.93 to 1.94 as a user, it failed to apply the change to the profile. It failed on trying to remove the Lix 1.93 package from the profile, specifically it failed to open the profile lock in `/nix/var/nix/profile/default`, with a permissions error. I have lost the original logs, I did not save them and I have worked around the issue by running the upgrade as root: ``` sudo -s source /nix/var/nix/profile/default/etc/<something>.d/nix.sh nix upgrade-nix ``` I have not tried to reproduce this in a VM yet but was asked to make the issue when I brought it up in the Matrix chat. I'll see if I can get around to trying to reproduce. ## Steps To Reproduce 1. Install Lix 1.93 on Ubuntu 22.04 2. `nix upgrade-nix` ## Expected behavior It should have worked! ## `nix --version` output Lost it after I worked around the issue :(, upgrading from 1.93 -> 1.94 though. ## Additional context Ubuntu 22.04 Lix was installed through the online installer. There is a chance I installed NixCpp first, then uninstalled it to replace with lix. I don't know if this is true.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix#1054
No description provided.