Reinstall Bitcoin Core when apps depend on it

Hi, I did something really stupid.

I uninstalled bitcoin core while other apps (electrs, jam, lightning) still depend on it. When I try to reinstall on the command line:

sudo ./umbrel/scripts/app install bitcoin

I get this error and it stops:

/home/umbrel/umbrel/app-data/lightning/exports.sh: line 18: APP_BITCOIN_NETWORK: unbound variable

It looks like some environment variables are needed for the install that are not there now. In this case lightning needs APP_BITCOIN_NETWORK, but it’s not defined yet. Any help on how to get this install of bitcoin core through?

Thank you in advance.

Ok, I got the installation running again. I had to temporarily move the lightning folder so that Umbrel is not invoking the offending scripts.

mv ~/umbrel/app-data/lightning/ ~/umbrel
sudo ./umbrel/scripts/app install bitcoin
mv ~/umbrel/lightning/ ~/umbrel/app-data/

Now bitcoin is up and syncing again.