# Pihole -up failing with /opt/pihole/update.sh: line 108: : No such file or directory

**URL:** <https://discourse.pi-hole.net/t/pihole-up-failing-with-opt-pihole-update-sh-line-108-no-such-file-or-directory/78991>\
**Category:** Community Help\
**Created:** [April 9, 2025, 12:24pm UTC](https://discourse.pi-hole.net/t/pihole-up-failing-with-opt-pihole-update-sh-line-108-no-such-file-or-directory/78991 "2025-04-09T12:24:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![miros](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/miros/32/49313_2.png) [@miros](https://discourse.pi-hole.net/u/miros)\
**Post date:** [April 9, 2025, 12:24pm UTC](https://discourse.pi-hole.net/t/pihole-up-failing-with-opt-pihole-update-sh-line-108-no-such-file-or-directory/78991/1 "2025-04-09T12:24:20Z")

</div>

Hi,

I was also experiencing errors with using `pihole -up` and this error:

```auto
/opt/pihole/update.sh: line 108: : No such file or directory

```

This was raised previously in [Files missing after pihole update](https://discourse.pi-hole.net/t/files-missing-after-pihole-update/76227) but the issue was closed, because it looked like an issue with incompatible OS. However I was experiencing the same issue on a compatible OS (Raspberry Pi with Debian/Bookworm).

Upon a detailed inspection, the line 108 was `source "${setupVars}"` but no `setupVars` were defined anywhere, hence the error. I'm not sure how this seemingly broken file got to this state, maybe via a previous failed upgrade. I have fixed it by replacing the file's content `sudo nano /opt/pihole/update.sh` with the latest content from [pi-hole/advanced/Scripts/update.sh at 0f7803b7753b581ed747eb6398be0c78dbfdc845 · pi-hole/pi-hole · GitHub](https://github.com/pi-hole/pi-hole/blob/0f7803b7753b581ed747eb6398be0c78dbfdc845/advanced/Scripts/update.sh)

Then rebooted the system, and `pihole -up` started to work again.

Hope this helps anyone running into the same issue.

---

<div class="post-metadata">

**Author:** ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)\
**Post date:** [April 9, 2025, 3:11pm UTC](https://discourse.pi-hole.net/t/pihole-up-failing-with-opt-pihole-update-sh-line-108-no-such-file-or-directory/78991/2 "2025-04-09T15:11:04Z")

</div>

Don't do this. Running scripts from previous versions will break things in ways that can be very difficult to diagnose.

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [April 30, 2025, 3:11pm UTC](https://discourse.pi-hole.net/t/pihole-up-failing-with-opt-pihole-update-sh-line-108-no-such-file-or-directory/78991/3 "2025-04-30T15:11:11Z")

</div>

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
