Can't uninstall flox-prerelease

Hi,

I currently cannot uninstall a prerelease version in an environment:

± flox --version                                                                                                                                                                                                                                                                                                              Version: 0.0.8-r113

± flox list -e default                                                                                                                                                                                                                                                                                                        default etorreborre/scala etorreborre/default
etorreborre/default
    Alias     default
    System    x86_64-darwin
    Path      /Users/etorreborre/.local/share/flox/environments/etorreborre/default
    Curr Gen  117

Packages
    0 stable.etorreborre.cheat-sh
    1 stable.etorreborre.cmt
    2 unstable.flox.flox-prerelease
    3 stable.nixpkgs-flox.bat
    4 stable.nixpkgs-flox.curl
    5 stable.nixpkgs-flox.direnv
    ... etc

± flox rm 2 -e default                                                                                                                                                                                                                                                                                                        warning: ignoring untrusted substituter 'https://cache.floxdev.com'
warning: ignoring untrusted substituter 'https://cache.floxdev.com'
No environment changes detected .. exiting

± flox list -e default                                                                                                                                                                                                                                                                                                        default etorreborre/scala etorreborre/default
etorreborre/default
    Alias     default
    System    x86_64-darwin
    Path      /Users/etorreborre/.local/share/flox/environments/etorreborre/default
    Curr Gen  117

Packages
    0 stable.etorreborre.cheat-sh
    1 stable.etorreborre.cmt
    2 unstable.flox.flox-prerelease
    3 stable.nixpkgs-flox.bat
    4 stable.nixpkgs-flox.curl
    5 stable.nixpkgs-flox.direnv
    ... etc 

And if I try an upgrade I get

± flox upgrade -e default                                                                                                                                                                                                                                                                                                     warning: ignoring untrusted substituter 'https://cache.floxdev.com'
warning: ignoring untrusted substituter 'https://cache.floxdev.com'
error: path '/nix/store/clhs1awgifyyzcd75f29r3i55ah89x7v-flox-prerelease-0.1.0-r260-0.0.8-r124' does not exist and cannot be created

I wonder if I should nuke everything and start anew since I have been going through some major flox changes.

BTW I actually wanted to remove the unstable version because of this issue

○ flox --version                                                                                                                                                                                                                                                                                                                                                    Version: 0.1.0-r254-0.0.8-r123

○ flox list -e default                                                                                                                                                                                                                                                                                                                                              ERROR: Unable to open bash flox meta

What do you think?

Hey Eric, thanks for reporting this. Which flox version are you on here?

There 's a bug in Discourse… The version numbers are in the markdown but not the rendered text.

The first version is Version: 0.0.8-r113
The second one is Version: 0.1.0-r254-0.0.8-r123

This warning is the key. Newer versions of flox are using signed builds and distribution, but those settings don’t change very easily (this is on purpose, as they are the responsibility of the installer).

Please update flox via (https://beta.floxdev.com/docs/managing-flox/user_update/) which should update your daemon with the new settings.

I did a re-install via the mac installer and I still cannot remove the flox-prerelease package from my default environment

○ /usr/local/bin/flox rm unstable.flox.flox-prerelease -e default                                                                                                                                                                                                                                                                                                   No environment changes detected .. exiting

I am using

○ ll /usr/local/bin/flox                                                                                                                                                                                                                                                                                                                                            default
Permissions Size User Date Modified Name
lrwxr-xr-x    68 root 11 Jan 18:37  /usr/local/bin/flox -> /nix/store/5vl52602dznla4pif0adr4v1wi3b8s36-flox-0.0.8-r123/bin/flox*

I forgot to mention that flox upgrade -e default worked ok without warning.

Hi @etorreborre. Just to confirm, with flox upgrade -e default working for you, did that get you out of the loop you were in?

Hi Robin. No I still have the same issue and I can’t remove flox-prerelease from my default environment.

Thanks for clarifying; I’m asking Michael to look into it :slight_smile:

Hi Eric. You asked if it would make sense to start over with your default environment and I would say yes, it would be good to clear out the old format metadata. Let’s start by doing that:

flox push # to make sure you have a backup
flox export > /tmp/default.tar
flox destroy
flox import < /tmp/default.tar
flox edit # remove mention of prerelease 
flox push —force # to remove old history upstream

That should do it - if any of those steps don’t work please can you repeat with —debug and send the output?

On the topic of prerelease, I suggest you switch to using the flox-managed flox/prerelease environment going forward. Not only does it provide you with the latest flox but will soon also provide the necessary magic to enable flox command line completion. Good stuff. :+1:

(More background info on our plans for flox-managed environments is available here.)

1 Like

I’m back on track, thanks!

○ flox --version                                                                                                                                                                                                                                                                                                                             Version: 0.1.0-r264-0.0.8-r131
1 Like

great news! Thanks for confirming! :slight_smile: