Pinning a specific PPA from Launchpad
I figured it out:
Package: *
Pin: release o=LP-PPA-ondrej-php
Pin-Priority: 1001
Pin: release o=<ppaname>
where the ppa name is found by running apt-cache policy
and inspecting the output:
1001 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 Packages
release v=18.04,o=LP-PPA-ondrej-php,a=bionic,n=bionic,l=***** The main PPA for supported PHP versions with many PECL extensions *****,c=main,b=amd64
origin ppa.launchpad.net
Use snippet below:
cat <<EOF | sudo tee /etc/apt/preferences.d/pin-ppa
Package: *
Pin: release o=LP-PPA-ondrej-php
Pin-Priority: 1337
EOF