Prevent Pi-hole UPDATE to install dhcpcd5?

Pin the package in APT:

pi@noads:~ $ man apt_preferences
APT_PREFERENCES(5)                       APT                      APT_PREFERENCES(5)

NAME
       apt_preferences - Preference control file for APT

DESCRIPTION
       The APT preferences file /etc/apt/preferences and the fragment files in the
       /etc/apt/preferences.d/ folder can be used to control which versions of
       packages will be selected for installation.
[..]
   How APT Interprets Priorities
       P < 0
           prevents the version from being installed

Check policy:

apt-cache policy dhcpcd5

Create new file:

sudo nano /etc/apt/preferences.d/dhcpcd5

Containing:

Package: dhcpcd5
Pin: release *
Pin-Priority: -1

Run update:

sudo apt-get update

And check again:

apt-cache policy dhcpcd5

EDIT: This makes the dhcpcd5 package unavailable for installment but not sure if the Pi-hole installer/updater can deal with this.

1 Like