How did I install Varnish 6.4 to Debian 10?

I have found the solution here: github.com/varnishcache/pkg-varnish-cache/issues/127#issuecomment-607898105

Step 1

I removed an outdated (6.1.1) Varnish version provided by the official Debian repository:

aptitude remove varnish

Step 2

aptitude update
aptitude install debian-archive-keyring
aptitude install curl gnupg apt-transport-https
curl -L https://packagecloud.io/varnishcache/varnish64/gpgkey | sudo apt-key add -

packagecloud.io/varnishcache/varnish64/install#manual-deb

Step 3

I added to /etc/apt/sources.list:

deb https://packagecloud.io/varnishcache/varnish64/debian/ buster main
deb-src https://packagecloud.io/varnishcache/varnish64/debian/ buster main

packagecloud.io/varnishcache/varnish64/install#manual-deb

Step 4

aptitude update
aptitude  install varnish=6.4.0-1~buster

packagecloud.io/varnishcache/varnish64/packages/debian/buster/varnish_6.4.0-1~buster_amd64.deb

Step 5

Checking the result:

varnishd -V

01

unix.stackexchange.com/a/71984

See also: How did I install Varnish 6.1 to Debian 10?