ERROR - Unable to update package cache

Hi there,

For some reason the pi-hole installation gets stuck with the following:

::: You are root.
::: Verifying free disk space...
:::
::: Updating local cache of available packages...
!!! ERROR - Unable to update package cache. Please try "test_dpkg_lock; apt-get update"root@raspberrypi:/home/pi# sudo apt-cache policy

I have tried:

sudo apt-get autoclean
sudo apt-get autoremove
sudo apt-get clean
sudo apt-get update
sudo apt-get ugrade
sudo reboot

and even deleted the lock files. To no avail!
Google hasn't brought up anything to solve this, so I am turning here.
Please lend me your debugging prowess

Gotcha. I had a bad repo in my sources.list that I simply had to remove.

sudo vi /etc/apt/sources.list

and delete it.

1 Like