# Reinstall Bitcoin Core when apps depend on it

**URL:** https://community.umbrel.com/t/reinstall-bitcoin-core-when-apps-depend-on-it/14837
**Category:** Support and Troubleshooting
**Created:** [January 5, 2024, 11:38am UTC](https://community.umbrel.com/t/reinstall-bitcoin-core-when-apps-depend-on-it/14837 "2024-01-05T11:38:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![SunOfABeach](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@SunOfABeach](https://community.umbrel.com/u/SunOfABeach)
#### Post date: [January 5, 2024, 11:38am UTC](https://community.umbrel.com/t/reinstall-bitcoin-core-when-apps-depend-on-it/14837/1 "2024-01-05T11:38:42Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![SunOfABeach](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@SunOfABeach](https://community.umbrel.com/u/SunOfABeach)
#### Post date: [January 5, 2024, 12:51pm UTC](https://community.umbrel.com/t/reinstall-bitcoin-core-when-apps-depend-on-it/14837/2 "2024-01-05T12:51:22Z")

</div>

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

```auto
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.
