Error after upgrading flox: cannot find flake 'flake:demo' in the flake registries

After upgrading flox from 0.0.7-r93 to 0.1.0-r339-0.0.10-r180 a flox edit prompts me with:

floxmeta repository (/tmp/tmp.efez2cVLxW/13) using deprecated (<=0.0.7) format.
                                   
Convert to latest (>=0.0.8) format?
                                   
           Yes        No

Where selecting “No” apparently just exits the program and selecting “Yes” leads to:

error: cannot find flake 'flake:demo' in the flake registries
(use '--show-trace' to show detailed location information)

A flox list shows:

fleimgruber/x86_64-linux.default
    Alias     default
    System    x86_64-linux
    Path      /home/fps/.local/share/flox/environments/fleimgruber/x86_64-linux.default
    Curr Gen  13

Packages
    0  nixpkgs#python310Packages.ptpython  python3.10-ptpython-3.0.20
    1  stable.nixpkgs-flox.cowsay          3.04
    2  stable.nixpkgs-flox.fortune         mod-3.14.1
    3  stable.demo.hello-python            python3.10-hello-python-0.0.0
    4  stable.nixpkgs-flox.jabref          5.6

Where I suspect the package 3 “stable.demo.*” does not exist anymore and was from an earlier version of the tutorial docs?

You hit the nail on the head. :slight_smile:

First, many thanks for bearing with us on this journey. We’ve revised the formats of the environments a few times and you’re right that in this case it is the stable.demo.hello-python package that’s derailing the attempt to convert this environment to the 0.0.8 format.

The best way to get back on the rails is to start over with the following steps:

  1. flox list to see your package list
  2. flox destroy to remove the local copy of your environment
  3. flox install <packages you want to keep from step 1>
  4. once you’re happy with the new environment, flox push --force to overwrite the upstream copy
  5. then flox pull from any other machines where you have flox installed

Please let us know if that does the trick!

Thanks, the steps you provided did the trick!

2 Likes