If you run rm -rf _opam insetad of opam switch remove . to delete a local switch, opam cannot update the config properly. If you try to update the layout under these conditions, you will get an error like the following, but it should not occur or it should be more friendly.
~
❯ opam update --upgrade
This version of opam requires an update to the layout of /home/smorimoto/.opam from version 2.1~alpha to version
2.1~rc, which can't be reverted.
You may want to back it up before going further.
Perform the update and continue? [Y/n] y
Fatal error:
Sys_error("/home/smorimoto/src/github.com/REDACTED/REDACTED/_opam/.opam-switch/switch-config: No such file or directory")
If you run
rm -rf _opaminsetad ofopam switch remove .to delete a local switch, opam cannot update the config properly. If you try to update the layout under these conditions, you will get an error like the following, but it should not occur or it should be more friendly.